This is not necessary. The ARRAY is at children.get(0) and the index is at children.get(1). You just need the following constructor:

    public ArrayIndexFunction(List<Expression> children) throws SQLException {
        super(children);
    }