Problem: std::vector, std::set, std::map and std::unordered_set fields and parameters only work when they use the default comparator, hash and allocator types. Anything else, like Bitcoin Core's GCSFilter::ElementSet (std::unordered_set<Element, ByteVectorHash>), fails to compile with "no matching function for call to CustomBuildField". Bitcoin Core currently works around this by copying the std::unordered_set read and build functions into its own code (bitcoin/bitcoin#29409).
Solution: Make the container overloads in type-vector.h, type-set.h, type-map.h and type-unordered-set.h templates over the containers' comparator, hash and allocator types. Small change to the four headers, plus a FooStruct round-trip test with a descending std::set and std::map, an std::unordered_set with a custom hash, and a std::pmr::vector.