Setting bones to layers white it is Single

Is there a way to set bones from my character to layers on separate body parts because i want his arm to get in front of table and his body behind the table but i don’t know how…

Here is a screenshot:


Any thoughts ?