but isn't it example of wrong evaluation? Result of row_number is not correct
Looks right to me. I guess the way to get the row_number they're after out of the result set would involve changing OVER () to OVER (ORDER BY unnest(myTextArrayColumn))
it looks like row_number is evaluated before SRF - this behave is absolutely undefined - for me - more native behave is different evaluation.