int array[N][M] è equivalente a int array[N*M]

array[i][k] è equivalente a array[i*M+k]

Sfruttando ciò potresti scrivere una cosa del tipo

int *indexer = (int *)array;

E usarlo come un array di N*M