The way it’s often done in movies and commercials (if it’s not digital extras) is to either do a lock off, or use motion control for moving shots. First shoot a plate shot with no one in the shot. Then take the small group and have them sit in one section with green screen behind them where there needs to show more extras. Then they change clothes and rearrange. Sit in the next section with green screen behind them once again where ever something may need to be placed behind them and so on till you have enough to fill the scene.
We did a opening wide shot where we needed a group of people talking in front of a fleet of trucks. But we only had one truck. We locked off the cam. Shot a plate of the environment. Moved the truck to each position and shot some film. Then put the group of people in the FG with greenscreen behind them. The ppl were keyed out and the vans were masked. But vans don’t move or change shape so in that case roto is far simpler than setting up greenscreen on set whereas it is the opposite case for ppl.
Chris Smith
https://www.sugarfilmproduction.com