partition array