Meh, the solution is already there.
Have a look to the second picture in post #2. The formula for/in column Z will do. The disadvantage is that you will have to use 136 registers.
An example with a table with just 12 values:
Hmm, I'm not sure we are on the same page. I'd might misunderstand you. For one given value (row number = input) I'd want the column and layer number (= output). The column and layer number are "unknown". So you'd have to define the entire table first (since the values in table aren't in a usuable pattern), to be able to do this.