Given an array representing a permutation, find the next lexicographically larger permutation in-place.
Example: [1,2,3] → [1,3,2]. [3,2,1] → [1,2,3] (wrap around).
Hint: Find the first decreasing element from the right, swap it with the smallest larger element to its right, then reverse the suffix.