Collision detection 50+ objects?

Ok, I have found some tutorials online for advanced collision detection like this, but not understood them.

Like this one: But the source is way too complicated for my scripting skills.

Can someone share their knowledge on massive collision detection done without hitTest?

I’m trying to make the enemies collide with each other and not overlap: - WASD+mouse are the keys
All tips are more than welcome!

PS! I’m using raycasting for bullets.