added codegen for array arguments