Updating Type so that cast and isAssignableFrom take arrays instead of single objects/types and return a tuple containing the result and the remaining array elements. This will allow tuples of size > 1 to be properly wrapped and make parsing easier.