unwrapArrayTypes

Takes a type that may be an ArrayType. Unwraps ArrayTypes until the element type is found.

Return

a pair of the element type, and the unwrapped ArrayTypes, if any.