Many helpful functions for Javascript Arrays