add key and value type metadata to fields, deduction functions