It's almost the same, you just need to replicate y and run PROC NPAR1WAY on x1-xm. For example:
proc iml;
/* the data */
x = T(1:10)|| T(0:9) || T(2:11);
y = {2,5,3,8,7,6,6,9};
/* concatenate data and add ID variable; write to data set */
z = x // repeat(y, 1, ncol(x));
ID = repeat(1, nrow(x)) // repeat(2, nrow(y));
Q = ID || z;
varNames = "ID" || ("x1":("x"+strip(char(ncol(x)))));
create KSData from Q[c=varNames];
append from Q;
close KSData;
/* submit; */
proc npar1way data=KSData plots=none noprint;
class ID;
var x:;
output out=KSOUT edf;
run;
/* endsubmit; */
Now read the p-values, which are in the KSOUT data set.