How to click on a game object and get it to move in formation with the character?

How can I click an object and then get it to become a child of the main camera and there would be an animation of it moving from where ever it was to a position under the camera?

You can do something like this to make an object a child when it is clicked on:

function OnMouseDown() {
   transform.parent = Camera.main.transform;
}

To “Animate” it moving under the camera, use Vector3.Lerp() in Update() to change the transform.localPosition over time.