Before I can do any interesting things with the animals (e.g. taming), I need to solve the problem that animals disappear forever as soon as you leave the area. They need to stay. A related issue is that it’s impossible to keep the animals out of any area at the moment. As soon as you leave and come back, it may happen that a new batch of animals spawn inside your well fenced off field.
I have thought about it for a long time and I think I have a solution. I will work on it soon, and you might see it in 1.13 if everything goes well.
The result will be that the animals only spawn once in a given area. After that, no more spawning. This also means that you will be able to kill all of them and see no more until you walk further away and herd some back.
Additionally, I may make them spawn again if you leave the area for a very long time.