I don't see how this would be better than simply using a HandleTable. The argument of speed is not really convincing when your GetUnitIndex function is not inline friendly.
Evein with inlining, I don't paticularly care for the speed benefits. For me, the index/deindex events are the main selling point of indexing systems, since they allow you to easily do automatic creation and recycling. Without even that, I don't know what this script is supposed to do.