Refactor getOptionPairs() to remove code duplicated between normal fields and many-to-many