The first index number will indicate which line it is (i.e. 0 for the first OTI line, the 1 for second OTI line, etc.) while the second number indicates the element in that line.
So just write:
$data{type}->[line][element]
to access the element you want.