Port "Make array copy primops inline" and related patches to new codegen.