reshuffle array functions in index