List::Util provides functions such as

It resides in a distribution called Scalar-List-Utils