Animation-object integration?

Hello.I have a simple question.Let’s say I want to make an object pickup or sword swing animation.How can I do that?I mean how can I make it work for any object?Change equipment or pick different objects up.Thanks!

Changing the parent of a game object from one object to the other.

What have you tried so far?