Create New Array From Existing Javascript Function Declaration