**Use case**

To be able run arrayCompact with deduplication based on some function from input value.

**Describe the solution you'd like**
```
SELECT
    [(1, 'a'), (2, 'b'), (3, 'b'), (4, 'c')] AS arr,
    arrayCompact((x)-> x.2, arr)
```
**Describe alternatives you've considered**

```
SELECT
    [(1, 'a'), (2, 'b'), (3, 'b'), (4, 'c')] AS arr,
    arrayFilter((x, y) -> ((x.2) != y), arr, arrayPushFront(arrayPopBack(arr.2), '')) AS x

Query id: ae74a2c7-5bc5-4b77-8fc4-85fd7e6bca25

┌─arr───────────────────────────────┬─x─────────────────────────┐
│ [(1,'a'),(2,'b'),(3,'b'),(4,'c')] │ [(1,'a'),(2,'b'),(4,'c')] │
└───────────────────────────────────┴───────────────────────────┘
```


{
        ColumnPtr res;
        mapped = mapped->convertToFullColumnIfConst();
        if (!(executeType< UInt8 >(mapped, array, res) ||
            executeType< UInt16>(mapped, array, res) ||
            executeType< UInt32>(mapped, array, res) ||
            executeType< UInt64>(mapped, array, res) ||
            executeType< Int8  >(mapped, array, res) ||
            executeType< Int16 >(mapped, array, res) ||
            executeType< Int32 >(mapped, array, res) ||
            executeType< Int64 >(mapped, array, res) ||
            executeType<Float32>(mapped, array, res) ||
            executeType<Float64>(mapped, array, res)) ||
            executeType<Decimal32>(mapped, array, res) ||
            executeType<Decimal64>(mapped, array, res) ||
            executeType<Decimal128>(mapped, array, res))
        {
            executeGeneric(mapped, array, res);
        }
        return res;
    }
};
struct NameArrayCompact { static constexpr auto name = "arrayCompact"; };
using FunctionArrayCompact = FunctionArrayMapped<ArrayCompactImpl, NameArrayCompact>;
void registerFunctionArrayCompact(FunctionFactory & factory)
{
    factory.registerFunction<FunctionArrayCompact>();
}
}