Which animals have eyes with rectangular pupils?
And the answer: goats.
An animal's pupils can give a hint as to whether they're prey or a predator. Predatory animals tend to have vertical slit pupils, while herbivores that are prey for other animals, like goats, usually have horizontal pupils.
While your average indoor cat likely isn't engaging her sharp eyes to catch mice or other prey, it is that predator/prey distinction that accounts for differently shaped eyes. Horizontal pupils have evolved to enable a nearly panoramic view, allowing the herbivores to scan for danger from a great distance. While larger prey animals such as horses and sheep are constantly pitching their heads downward to graze, their pupils remain parallel to the earth. By swiveling their eyes outward these peaceful creatures are able to keep their surroundings in view while enjoying their meal.
Meanwhile, predators with vertical pupils, such as cats and crocodiles, use their thin line of vision to narrow in on prey across visual obstacles, often through some sort of concealing foliage. The thin-slitted eyes of these shorter predators is ideal for judging distance and enables them to pounce with great accuracy. However, larger predators such as lions and tigers (and bears, oh my!) each have more human-like round pupils. This is due to the evolutionary hunting habits of bigger predators: animals higher off the ground require more holistic vision to chase after their prey.
To learn more about how animals see the world, check out the video below.