How to realize the function of similar layer?

I want to select a large number of objects in the scene and drag them to a place to form an array variable under an actor.