Untangle snapshot mapper

Also fixed performance issue with `StructEncoding` arbitrary
All this is definitely general now, and will be a lot better not split.