migrate old index mapping to new array type mapping

isn't there such a thing in the codebase already?