If data is a 2D array, data[1] can be used as 1D array code example
Example: array 2d to 1d
int array[width * height];
int SetElement(int row, int col, int value)
{
array[width * row + col] = value;
}
int array[width * height];
int SetElement(int row, int col, int value)
{
array[width * row + col] = value;
}