Quantum magnetism in dipolar Rydberg atom arrays