Artificial square ice and related dipolar nanoarrays.