Restriction enzymes are common tools to compose genetically engineered plasmids in vitro. In laboratory circumstances it is possible to break DNA strands and recombine it with another strand.
However, I do not know whether such processes may happen spontaneously in cells that contain endonucleases and are co-infected with DNAs of different viruses? Or splitting and recombining DNA strands by endonucleases may only work with isolated endonucleases in laboratory settings?