Convert an object to an array, array to an object, or a function with multiple arguments into a function that takes an options map.