Tested with latest version on play.clickhouse.com (22.10.1.1875)

```sql
SELECT arrayFirst((x,f) -> f, [1,2,3,NULL], [0,1,0,0]) as test
```
returns 2 as expected.

But:
```sql
SELECT arrayFirstOrNull((x,f) -> f, [1,2,3,NULL], [0,1,0,0]) as test

Code: 44. DB::Exception: Nullable(UInt8) cannot be inside Nullable column. (ILLEGAL_COLUMN) (version 22.10.1.1875 (official build))
```
tries to wrap another Nullable layer. It seems to be inconsistent in some way if we should use this function on various columns programatically.

And, BTW, it would be great if we could use Nullable columns in filter column of higher-order functions. Why is this forbidden now?
```sql
SELECT arrayFirst((x,f) -> f, [1,2,3,4], [0,1,0,NULL]) as test

Code: 44. DB::Exception: Unexpected type of filter column. (ILLEGAL_COLUMN) (version 22.10.1.1875 (official build))
```
{
    Default,
    Null
};
template <ArrayFirstLastStrategy strategy, ArrayFirstLastElementNotExistsStrategy element_not_exists_strategy>
struct ArrayFirstLastImpl
{
    using column_type = ColumnArray;
    using data_type = DataTypeArray;
    static bool needBoolean() { return false; }
    static bool needExpression() { return true; }
    static bool needOneArray() { return false; }
    static DataTypePtr getReturnType(const DataTypePtr & , const DataTypePtr & array_element)
    {
        if constexpr (element_not_exists_strategy == ArrayFirstLastElementNotExistsStrategy::Null)
            return makeNullable(array_element);
        return array_element;
    }
    static ColumnPtr execute(const ColumnArray & array, ColumnPtr mapped)
    {
        const auto * column_filter = typeid_cast<const ColumnUInt8 *>(&*mapped);
        if (!column_filter)
        {
            const auto * column_filter_const = checkAndGetColumnConst<ColumnUInt8>(&*mapped);
            if (!column_filter_const)
                throw Exception("Unexpected type of filter column", ErrorCodes::ILLEGAL_COLUMN);
            if (column_filter_const->getValue<UInt8>())
            {
                const auto & offsets = array.getOffsets();