This task is dead easy if your characters are 3D, and fairly difficult if they are 2D. In 3D, you just model each component separately, then attach the components to different bones in the skeleton. Doing the job in 2D requires a complex layering system, wherein each little piece needs to be assigned a layer in the drawing order so that they are drawn correctly. Now, to add a wrinkle, you can't assign this depth based on the component type alone. You also have to take into account player orientation. For example, a sword; when the player is walking to the left with his sword in his right hand, the sword is partly obscured by the body. But when the player is walking to the right, the sword is fully visible. I believe it was sticky little issues like this that prompted Blizzard, in their Diablo 2
post-mortem, to say that Diablo 2 would probably be their last 2D game.
If you want to increase your graphics requirements, you could implement it as a shader-based system, where each component of the final sprite stores a depth map for itself usable by the shader to draw the sprite. However, this does drastically increase the minimum spec of the graphics card, and might baffle and annoy users with older hardware who wonder why a simple 2D game won't run on their machine.