[ty] Compact retained semantic arrays (#25454)
## Summary
Reduces the memory retained by Salsa-cached semantic indexes by using a
`FrozenIndexVec` for index-addressed immutable arrays, like the
`FrozenMap` abstraction.
Apart from a >1% memory reduction, we see a 1% improvement on `attrs`,
`anyio`, `hydra-zen`, `multithreaded`; 1% regression on `pydantic` and
`freqtrade`.