It makes sense to keep util::insert and util::AnyPtr functions in util/, not common/ as these are header-only template functions with no dependencies, and there's no particular reason they shouldn't be used by kernel code even if they aren't used right now.
This is a partial backport of core#27636
https://github.com/bitcoin/bitcoin/pull/27636/commits/44de325d95447498036479c3112ba741caf45bf6
Depends on D16210