To keep them away, a Hydro Turret can be installed, which shoots the incoming Tarr. Of course, you can put a Tarr in a corral, but since they disappear after a while, they cannot be farmed.