[C++] Array modification callback

Wrap the array modification in functions that the delegate will also call, and perform all array operations through these functions.