Issue 13594: nextPermutation should work with static arrays too.

Fixes: https://issues.dlang.org/show_bug.cgi?id=13594
Workaround for `arr[]` not being an lvalue, which is the real cause of the bug.