Generate comparator functions with deep object access support.