Scientists have created tiny, shape-changing robots made entirely of metal that could one day deliver medicines inside the body and collect tissue samples without pain.