Viviparity is the ability of an animal to give birth to live young instead of laying eggs. Among the four given options, viviparity mainly occurs in mammals. This is because mammals have developed a unique reproductive system in which the embryos develop within the mother's body through a specialized organ called the placenta. The placenta allows the developing fetus to obtain nutrients and oxygen from the mother's bloodstream, while also removing waste products. This process of internal gestation and nourishment is what allows mammals to give birth to live young, rather than laying eggs like other animals such as reptiles, aves (birds), and amphibians. So, the correct option is mammals.