Adding new dimensions to the self-assembly of nanomagnets