Since I'm using an element of an array as an index of another array, is the following inequality still considered as ILP representation?
$1 - M[s[i], s[k]] + M[s[i], s[j]] >= 1$
M and S are respectively 2d and 1d arrays and S's elements are in the range of M's indexes.
It is not valid because $s$ is not constant. If $M$ is fixed, you can use $\sum_{i,j} M_{ij} x_{ij}$ with $x_{ij}$ binary to select elements of $M$. For example, you can model $M_{s_i,s_j}$ as $\sum_{i,j} M_{ij} x_{ij}$ by using the following constraints on $x_{ij}$ that ensure that only $x_{s_i,s_j}$ is $1$ and the other elements of $x_{ij}$ are $0$: $$\sum_{i,j} i x_{ij} =s_i$$ $$\sum_{i,j} j x_{ij} =s_j$$ $$\sum_{i,j} x_{ij} =1$$ $$x_{i,j} \in \{0,1\}$$