Currently we need to write smth like
`select arrayFilter(...)[-1]`
to get the last element. 
At the same time, we have `arrayFirst` function for the first element of array.

I think clickhouse community need analogy of function arrayFirst, but for last element.

My proposal is arrayLast function:
```
select range(10)                               as arr,
       arrayFirst((a)->(a > 3 and a < 8), arr) as first_element,
       arrayLast((a)->(a > 3 and a < 8), arr)  as last_element
```
with result
![image](https://user-images.githubusercontent.com/4305175/148060114-81e83e9b-e02e-499e-8e1c-b48e99e46f02.png)

}
        }
        const auto & filter = column_filter->getData();
        const auto & offsets = array.getOffsets();
        const auto & data = array.getData();
        auto out = data.cloneEmpty();
        out->reserve(data.size());
        size_t pos{};
        for (auto offset : offsets)
        {
            auto exists = false;
            for (; pos < offset; ++pos)
            {
                if (filter[pos])
                {
                    out->insert(data[pos]);
                    exists = true;
                    pos = offset;
                    break;
                }
            }
            if (!exists)
                out->insertDefault();
        }
        return out;
    }
};
struct NameArrayFirst { static constexpr auto name = "arrayFirst"; };
using FunctionArrayFirst = FunctionArrayMapped<ArrayFirstImpl, NameArrayFirst>;
void registerFunctionArrayFirst(FunctionFactory & factory)