[C++] Array modification callback

I didn’t quite understand you.

Above I talked about something like this: