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

data(place).first = data(place).last = p_lhs;
            p_rhs = p_rhs->next;
            ++cur_elems;
        }
        else
        {
            p_lhs = data(place).last;
        }
        for (; cur_elems < new_elems; ++cur_elems)
        {
            Node * p_new = p_rhs->clone(arena);
            p_lhs->next = p_new;
            p_rhs = p_rhs->next;
            p_lhs = p_new;
        }
        p_lhs->next = nullptr;
        data(place).last = p_lhs;
        data(place).elems = new_elems;
    }
    void serialize(ConstAggregateDataPtr place, WriteBuffer & buf) const override
    {
        writeVarUInt(data(place).elems, buf);
        Node * p = data(place).first;
        while (p)
        {
            p->write(buf);
            p = p->next;
        }
    }
    void deserialize(AggregateDataPtr place, ReadBuffer & buf, Arena * arena) const override