Added sorting support in PArray