IdentityCache compiler generates wrong return types for `fetch_multi_n_by_m` fields
Description
After implementing the missing fetch_multi_n_by_m methods in https://github.com/Shopify/tapioca/pull/1758 I have found out that the method signature isn't always correct as shown in this example from cache_attribute: https://github.com/Shopify/identity_cache/blob/main/lib/identity_cache/cached/attribute.rb#L82-L101
The result of methods that include by in the name is a hash where:
- Key: type
m(be it a single value or an array of multiple) - Value: type
norT::Array[n]depending on things like ifuniquehas been passed tocache_attribute.
So at present when the return type is T::Array[n], it would be expected that it is actually T::Hash[T.untyped, n] or T::Hash[T.untyped, T::Array[n]] based on how it was created.
@KaanOzkan @Morriar So as not hold it up any further, I've marked two calls in the latest Core RBI update as T.unsafe, with smart TODOs pointing at this issue.