**How to reproduce**
Clickhouse version 20.11.5.18, 20.8.7.15, 20.3.19
```
SELECT
    groupUniqArray(val) AS uniq,
    toTypeName(uniq),
    groupArray(val) AS arr,
    toTypeName(arr)
FROM
(
    SELECT CAST(number % 2, 'Enum(\'hello\' = 1, \'world\' = 0)') AS val
    FROM numbers(2)
)

Query id: d4657f27-c8bd-4174-9947-c6c48d0222d5

┌─uniq──┬─toTypeName(groupUniqArray(val))─┬─arr───────────────┬─toTypeName(groupArray(val))────────────┐
│ [0,1] │ Array(Int8)                     │ ['world','hello'] │ Array(Enum8('world' = 0, 'hello' = 1)) │
└───────┴─────────────────────────────────┴───────────────────┴────────────────────────────────────────┘
```

}
        else
        {
            a.randomShuffle();
            a.total_values += b.total_values;
            for (size_t i = 0; i < max_elems; ++i)
            {
                UInt64 rnd = a.genRandom(a.total_values);
                if (rnd < b.total_values)
                    a.value[i] = b.value[i]->clone(arena);
            }
        }
    }
    void serialize(ConstAggregateDataPtr place, WriteBuffer & buf) const override
    {
        writeVarUInt(data(place).value.size(), buf);
        auto & value = data(place).value;
        for (auto & node : value)
            node->write(buf);
        if constexpr (Trait::sampler == Sampler::RNG)
        {
            DB::writeIntBinary<size_t>(data(place).total_values, buf);
            WriteBufferFromOwnString rng_buf;
            rng_buf << data(place).rng;
            DB::writeStringBinary(rng_buf.str(), buf);
        }
        
        
    }
    void deserialize(AggregateDataPtr place, ReadBuffer & buf, Arena * arena) const override