Implement copy_n and a version which stages through registers.