Generalize rest types to work for non-uniform rest args

All tests pass but there are still corner cases in the
non-uniform rest args.