Dipolar magnetism in ordered and disordered low-dimensional nanoparticle assemblies