If you have to operate on types, then accessing T.mutable is probably your best option.
T.mutable
But is hard to say more without context, can you make an MWE?