The thing is that multidimensional arrays are stored in one continuous block of memory (the C standard guarantees this). So you can use a simple pointer to reference them:
double mat[3][3] = { {1.0, 2.0, 3.0}, {1.0, 2.0, 3.0}, {1.0, 2.0, 3.0} };
double *ptr = (double *)mat;
Then you can iterate over the 9 numbers using this pointer and dereference it to obtain a double, which then can be cast/converted to another type.