Shuffling and extension of indexOf