```
SELECT
    CAST(([2, 1, 1023], ['', '']), 'Map(UInt8, String)') AS map,
    map[10]
```

Triggers `Assertion 'n < size()' failed` in `DB::ColumnString::operator[](unsigned long)`
https://clickhouse-test-reports.s3.yandex.net/18481/64c4ade5b0e0c9a13d6c2475431daf431fc97554/fuzzer/fuzzer.log

Introduced here: #17829
First found here: #18481
{
        return [element_wrappers = getElementWrappers(from_kv_types, to_kv_types), from_kv_types, to_kv_types]
            (ColumnsWithTypeAndName & arguments, const DataTypePtr &, const ColumnNullable * nullable_source, size_t input_rows_count) -> ColumnPtr
        {
            const auto * col = arguments.front().column.get();
            const auto & column_tuple = assert_cast<const ColumnTuple &>(*col);
            if (column_tuple.getColumn(0).size() != column_tuple.getColumn(1).size())
                throw Exception(ErrorCodes::TYPE_MISMATCH,
                    "CAST AS Map can only be performed from tuple of arrays with equal sizes."
                    " Size of keys: {}. Size of values: {}", column_tuple.getColumn(0).size(), column_tuple.getColumn(1).size());
            ColumnPtr offsets;
            Columns converted_columns(2);
            for (size_t i = 0; i < 2; ++i)
            {
                const auto & column_array = assert_cast<const ColumnArray &>(column_tuple.getColumn(i));
                ColumnsWithTypeAndName element = {{column_array.getDataPtr(), from_kv_types[i], ""}};
                converted_columns[i] = element_wrappers[i](element, to_kv_types[i], nullable_source, input_rows_count);
                if (!offsets)
                    offsets = column_array.getOffsetsPtr();
            }
            return ColumnMap::create(converted_columns[0], converted_columns[1], offsets);
        };
    }
    WrapperType createMapToMapWrrapper(const DataTypes & from_kv_types, const DataTypes & to_kv_types) const