I think you could achieve something like that using sortrows and reshape.
x = [1;2;1;2];
y = [3;3;4;4];
z = randn(4,1);
tdata=table(x,y,z);
tdata = sortrows(tdata,["x","y"])
tmat = array2table(reshape(tdata.z,length(unique(tdata.x)),length(unique(tdata.y))),...
'RowNames',string(unique(tdata.y)),'VariableNames',string(unique(tdata.x)))
Now use can use the variable names and row names to access your data from the table. The syntax you elect to use to access the data will determine your input order.
% (rows,variable)
Zval = tmat{"4","1"}
% Alternate syntax
Zval = tmat.("1")("4")