Try a pointer. C++ passes by value unless specified otherwise.
void foo(PackedInt64Array *arg){ (*arg)[0] = 1; }