4x1x1 FreeGrid boxes, plain and with subdivisions into two through six compartments. Can be printed without supports.
The most important thing is to make sure your magnets have the same orientation throughout the whole system.
More about the FreeGrid system and FreeCAD tools to build your own modules is available on our FreeGrid page.
The author marked this model as their own original creation.