Retrieves the value of the one-dimensional index from a two-dimensional array.