Add new index builders

This adds new ID index mappings (#428), providing mutable and immutable mappings from IDs to indexes.