dynamicAcc2: handle scalar functions, iteration
dynamicAcc2: cleanup & fix implementation of array ops