If you literally mean "library", then any rendering library will do just fine after you build the animation system. If you're looking for a program then After Effects or Flash (now Adobe Animate) are two options. The features that you've described are the base functionality of any animation program.
South Park started very lo-fi and later began to "emulate" the crappiness of the old system, by rendering silhouette shadows to make them look like paper cutouts. Fun!
Here's an old article breaking down South Park's process: https://www.quora.com/What-software-does-South-Park-use-to-a...