If you packed a lot of similar magnets together, they'd form regular magnetic patterns. They line up oriented the same way end-to-end, but opposite ways side-to-side. If they're all cylinders, I suppose the pattern would be square in the sideways plane, since that allows each sideways neighbor to be oppositely oriented. The net pattern would have no average magnetic moment. If you were to squeeze them, forcing them into a hexagonal pattern, I'm not sure what would happen, since that pattern won't allow each neighbor to be oppositely oriented.
Now what would happen if they're all different sizes and shapes? I don't know, but there's a suggestive relevant fact. If you take a bunch of identical non-magnetic spherical beads and slowly shake them around to let them settle down, they form a regular crystalline pattern. If you do the same with beads with more of a range of sizes, they also pack together rigidly, but in a random-looking pattern, like a glass. It's possible that a sufficiently heterogeneous collection of little magnets would form some sort of dipole glass.
I couldn't quite follow the more complicated part of your question. For searching purposes, you should know that certain types of random frozen magnets are called "spinglasses". There are other types of interesting frozen magnet systems which you might find by looking for "frustrated magnets". (Those hexagonally packed magnets would be frustrated, since there's no way to line them all up properly with each neighbor.
(published on 06/25/11)