Implementing Java's Collections.Shuffle() In JavaScript