Sounds like you're looking for something like this: https://mod.learntomod.com/program_profiles/2787110
I would modify this mod and make it so you're summoning one type of entity.
To modify this mod, click the button -- that will save it your programs page. Then go to https://mod.learntomod.com/programs, find the mod and click the button then make your changes.
Basically, what the mod does is summon individual entities until you have a group of them close together.