Haskell's missing mutable reference type

I’m still not quite sure what you mean. Yes, withIOScopedRef in particular, and IOScopedRef in general, is a feature I am arguing for! Part of its essential behaviour is to allow references to be allocated dynamically, just like an essential feature of IORef is that they can be allocated dynamically.

But suppose I had your contextual. I could define

contextual vault :: Contextual Vault
contextual vault = Vault.empty

to reconcile my interface with your implementation, couldn’t I?

(This is essentially what A reference implementation of IOScopedRef suggests: one global contextual variable, which is a vault.)