For a zero-based index, the two operations are, where width is the width of the structure:
row = index / width
column = index % width
Those are for C using integers, where the division rounds down and the % modulo operator gives the remainder. If you’re not using C, you may have to translate to the equivalent operations.
If you don’t have a modulo operator, you can use:
row = index / width
column = index - (row * width)