Using Grid Pro for inline editing of an array of values

I have a variable length list of numbers that I want to edit inline with Grid Pro.
The numbers are stored in an array of variable length in PostgreSQL hence the number of columns will vary from from time to time, but every grid instance will of course have the same number of columns per row.

It looks something like this:

How can I make code like this take an extra parameter for the index into the array?

        businessCaseGrid.addEditColumn(RequestBusinessCase::getCustomerTCV)
            .custom(InputFieldCreator.createFullWidthIntegerField(null, 0, 1999999999, null), (requestBusinessCase, newValue) -> {
                if (newValue != null && newValue >= 0) {
                    requestBusinessCase.setCustomerTCV(newValue);
                    saveBusinessCase(requestBusinessCase);
                } else {
                    showNotification("Validation error: CustomerTCV must be >= 0");
                }
            })
            .setRenderer(new NumberRenderer<>(RequestBusinessCase::getCustomerTCV, numberFormatLocal))
            .setHeader("Customer TCV");

Thanks

Just to be clear, I want to iterate over an array and use the index when constructing the inline editor and still be able to update the database after each edit, like above.

Something like this in principle - this doesn’t work (doesn’t compile):
for(int i = 0; i < arr.lenght; i++) {
businessCaseGrid.addEditColumn(RequestBusinessCase::getYearSequence(i))

requestBusinessCase.setYearSequence(i, newValue);

.setRenderer(new NumberRenderer<>(RequestBusinessCase::getYearSequence(i), numberFormatLocal))

}

I have made a solution that may be of interest to others.
You can see it here: