In reply to Shubhabrata:
The array manipulation methods iterate over elements in one dimension of an array. item is each element that dimension and item.index is the value of the index for that item.
The default expression if you do not specify a with(expression) is just item, but you can replace it with what ever you want using the index as an iterator.
A diagonal would be
a.sum() with (int'(a[item.index][item.index]))== 10;