Geometric mechanics of many-body systems