Utilities for Array manipulation in JavaScript