Dear Piyush,
of course you can turn the variable arr into a constant (your PlusCal algorithm can refer to it just like it refers to N). See TLA+ module attached to this message. When you create your model, you instantiate the constant arr by the _expression_ [i \in 1..N |-> i+1] or whatever _expression_ you want to test.
On the other side, you could be more adventurous and define TLA+ operators
IsSorted(a) == \A i \in 1 .. N-1 : a[i] <= a[i+1]
SortedArrays == { a \in [ 1..N -> 1..N+1 ] : IsSorted(a) }
then write
variables arr \in SortedArrays
TLC will enumerate all sorted arrays and check your algorithm for all of them. Of course, state explosion will kill you very quickly …
Best regards,
Stephan
Attachment:
BinarySearch.tla
Description: Binary data