write shuffle array