[PD] get maximum and its position of an array