For this very specific example, isn't there something like "Indexable[int]"?