Implants that sit in the body and reprogram a person’s immune cells could be used to treat a range of infectious diseases and even cancer. In a trial on mice with an aggressive melanoma that usually kills within 25 days, the new treatment saved 90% of the group.