I wonder if the type mappings would be better as an object over an array. Having a separate object might make merge operations and adds simpler. It also means we wouldn't have to copy arrays between the various expression objects in a query, they could all hold a reference to a single object.