Add a new 'subtypes' option to custom fields, allowing them to be restricted to subtypes, when used on an object supporting subtypes.
Currently only implemented in Maniphest, which is a mistake really; should be generic.
An even bigger mistake is the commented-out bit in transaction validation. There are two possible ways of doing this, and I'm not sure which would be better (than the other; either would be better than this).
First, we could put a first pass in which calculated the final/target object subtype by sweeping the transaction list before they were validated, and storing that somewhere.
Alternately, we could put that sweep in the custom-field transaction validation, looking for all subtype transactions (applied on top of the initial value) when validating custom-field transactions. But this could be a bit slow for many custom-field transactions, which is presumably exactly when you'd want this.