The least stressful way is to cut the mat in between the sections you want to cut and then chip, shave, or cutthe rock out from underneath them.
then with relatively little stress to the animal you can glue it where you want.
If this isnt possible then you can gently cut or pull the zoa and any mat along with it and stick it in some glue.
But assuming you have good water quality and a place for it to heal that it wont get infected or dirty, you can pretty much cut the tops of the polyps off and stick them in a wad of glue and they will be fine, just will take longer to bounce back from it
If you have algae or cyano issues or places of low flow do not put a recently abused and shredded polyp in aplace that it can grow cyano on it or you are increasing the mortality rate immensely