You tried to do it yourself first, didn't you?? Here's how I got it (but this is not the only way):

med.order<-order(apply(arrays,2,median))
boxplot(data.frame(arrays[,med.order]))