When a function is invoked, the arguments are pushed to the stack, but if an argument is a scope variable its reference is also pushed. This means you can access variables of the parent scope from within a function.
function do_something {
setarray(getarg(0), 69, 42, 1337);
return;
}...