**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)) │
└───────┴─────────────────────────────────┴───────────────────┴────────────────────────────────────────┘
```

{
    if (Trait::sampler == Sampler::NONE)
        return "groupArray";
    else if (Trait::sampler == Sampler::RNG)
        return "groupArraySample";
    
    __builtin_unreachable();
}
template <typename T>
struct GroupArraySamplerData
{
    
    using Allocator = MixedAlignedArenaAllocator<alignof(T), 4096>;
    using Array = PODArray<T, 32, Allocator>;
    Array value;
    size_t total_values = 0;
    pcg32_fast rng;
    UInt64 genRandom(size_t lim)
    {
        
        if (lim <= static_cast<UInt64>(rng.max()))
            return static_cast<UInt32>(rng()) % static_cast<UInt32>(lim);
        else
            return (static_cast<UInt64>(rng()) * (static_cast<UInt64>(rng.max()) + 1ULL) + static_cast<UInt64>(rng())) % lim;
    }
    void randomShuffle()