Cows are very safe for their herders, assuming there are no bulls (and there never are, those require containment). They can get defensive or spooked and then they're very numerous very large animals with hooves and horns, but their herders won't be the target of their aggression even if the herders are very mean. At least not intentionally.
Pigs are extremely dangerous to children in all cases (they will eat body parts with no hesitation and no effort, like carrots).
Goats are incredibly awesome and accept you as part of their pack and defend you from predators. They can also be assholes but playfully. As with cows, female only herds, as males are dangerous.
I've never herded sharks so I'll go with your opinion on those.
I tried to hang out with white tip reef sharks while snorkelling in Fiji at the start of the year. But they aren't very sociable.
I was able to hang out with a group of cuttlefish though. Cuttlefish are weird and cool.
it was in the news recently, an Israeli guy was hanging out with dusky sharks, a somewhat common past-time as they've always been considered to be safe for humans, but they ate him and dusky sharks are no longer considered safe.
From:
"A report by two shark experts has concluded that regular feeding of the large assembly of sharks at the site had encouraged the animals to adopt “begging behaviour” that led to the fatal incident. "
It won't stop me hanging out with sharks when I get a chance (but only some species - not Tiger sharks or White sharks!).