Create New Array From Existing Javascript Function How To Use