improved enumeration methods for arrays