Add toIndex method for a Map of Indexable objects