Clickhouse Server version: 22.3.2.1 and 21.6.5.37

Minimal Reproducible Code: 
`select
	arrayJoin(arrayDifference(groupArray(nb))) as res
from
	(
select
		toUInt32(number % 11) as nb
	from
		numbers(100))`

When I using arrayDifference function on an array of UInt32 elements, I get huge numbers around 2^32 instead of expected negative numbers.   
The same function works properly on Uint8, Uint16 and even Uint64.

And also I found 
> `The type of elements in the resulting array is determined by the type inference rules for subtraction (e.g. UInt8 - UInt8 = Int16).`

in document at [https://clickhouse.com/docs/en/sql-reference/functions/array-functions/#arraydifference](url)

So it seems like an unexpected result, but I'm not sure. Hoping for your anwser! 
static bool needExpression() { return false; }
    static bool needOneArray() { return false; }
    static DataTypePtr getReturnType(const DataTypePtr & expression_return, const DataTypePtr & )
    {
        WhichDataType which(expression_return);
        if (which.isUInt8() || which.isInt8())
            return std::make_shared<DataTypeArray>(std::make_shared<DataTypeInt16>());
        if (which.isUInt16() || which.isInt16())
            return std::make_shared<DataTypeArray>(std::make_shared<DataTypeInt32>());
        if (which.isUInt32() || which.isUInt64() || which.isInt32() || which.isInt64())
            return std::make_shared<DataTypeArray>(std::make_shared<DataTypeInt64>());
        if (which.isFloat32() || which.isFloat64())
            return std::make_shared<DataTypeArray>(std::make_shared<DataTypeFloat64>());
        if (which.isDecimal())
            return std::make_shared<DataTypeArray>(expression_return);
        throw Exception("arrayDifference cannot process values of type " + expression_return->getName(), ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT);
    }
    template <typename Element, typename Result>
    static void NO_SANITIZE_UNDEFINED impl(const Element * __restrict src, Result * __restrict dst, size_t begin, size_t end)