Support map and struct values equivalently.

Figured an abstraction that works better across maps and structs so the
same code can be used for both.