[Cleanup] Replace deprecated IndexSet::geomTypes with IndexSet::types

And switch to range-based for loops in the process.