I think arrays of 100x100x100 is a bit ambitious - 1,000,000 objects interacting in a rigid body simulation will take a long time to simulate.
However, the basic steps are as follows :
- Setup your Array modifiers to create the objects you desire.
- Apply the Array modifiers to create a 'combined' mesh.
- In Edit mode, choose Separate (P) and choose 'By Parts' - this will split the mesh into the individual elements created by your Array modifier. Note : The more "objects" you have in your arrays, the longer it will take for the Separate process to split.
- Go back to Object mode (Tab) - after the 'separate' you should still have all your newly separated objects selected. Use Set Origin (in the left-hand panel) and select By Geometry - this should set the origin of each separate mesh to the centre of its own geometry (required for the Rigid Body simulation).
- In the Physics tab, add Active Rigid Body physics to all the selected objects.
You can now run your simulation. Once it's complete and you have a state you are happy with, simply use Join (Ctrl+J) to join them into a single mesh.
Larger numbers of meshes will significantly slow down the various stages of the process (such as the Separate By Parts and the Rigid Body Simulation) so I'd suggest starting with a smaller number of objects before scaling up to more.