You can wire alternating strands hot & ground. As long as the animal touches 2 adjacent strands it will get shocked.
Here’s a page I found that has an illustration of a large version. And a picture of such a fence used to restrain elephants in Zambia...