Add rebuildRegionIndex function implementation. RegionIndex will rebuild
the index based on the deserialized index type and arguments.