added more codegen for array operations