The energy of arrays of dislocations in an anisotropic half-space