private RowDataToFieldConverter createArrayConverter(ArrayType type) {
        final LogicalType elementType = type.getElementType();
        Class<?> elementClass = toJavaClass(elementType);
        final RowDataToFieldConverter elementConverter = createConverter(elementType);
        final ArrayData.ElementGetter elementGetter = ArrayData.createElementGetter(elementType);
        return inputObj -> {
            ArrayData array = (ArrayData) inputObj;
            int numElements = array.size();
            Object[] output = (Object[]) Array.newInstance(elementClass, numElements);
            for (int i = 0; i < numElements; i++) {
                Object element = elementGetter.getElementOrNull(array, i);
                output[i] = elementConverter.convert(element);
            }

            return output;
        };
    }
Creates a runtime converter which assuming input object is not null.
inlong-sort/sort-formats/format-rowdata/format-rowdata-json/src/main/java/org/apache/inlong/sort/formats/json/RowDataToFieldConverters.java