Write a function that extracts the max value of a number in an array. If there are two or more max values, return it as an array, otherwise, return the number. This process could be relatively easy with some of the built-in Array functions, but the required approach is recursive.
isoGroup([31, 7, 2, 13, 7, 9, 10, 13]) ➞ 31
isoGroup([1, 3, 9, 5, 1, 7, 9, -9]) ➞ [9, 9]
isoGroup([97, 19, -18, 97, 36, 23, -97]) ➞ [97, 97]
isoGroup([-31, -7, -13, -7, -9, -13]) ➞ [-7, -7]
isoGroup([-1, -3, -9, -5, -1, -7, -9, -9]) ➞ [-1, -1]
isoGroup([107, 19, -18, 79, 36, 23, 97]) ➞ 107