Convert Index to a type-safe C++ container.