Regarding how the body "knows" how to form missing pieces, might be worth checking out Michael Levin's research regarding bio-electricity. Most interesting finding to me is that once modified, the animal bodies continue to produce different parts as if there is some electrical "memory" in the cells.
Here is an overview video: https://www.youtube.com/watch?v=XheAMrS8Q1c, though there are much longer lectures and papers which I would recommend if you are interested.