How to Grab a Character by Specific Bones?

I want to create a system in my first person game that allows me to grab an enemy by specific limbs. The effect would be kind of like crysis (where your character’s hand is physically holding onto the other person) but in this case, you’d be able to grab them by the arm, hand, leg, torso, neck etc. depending on what bone you’re looking at (I imagine achieved with a line trace)

I’m very new to programming and would love some insight on how to achieve something like this!