I use one macro for targeting:
/tar <pet name>
/run SetRaidTarget("target", 7)
which I put in my BottomRight Action Button 12 slot and keybind that to Num Pad 0. I have Num Pad . bound to Interact With Target.
Now when I am after a rare pet (say hello to Minfernal and Wanderer's Festival Hatchling
) I just alternate spam these two keys (or just the interact.)