add as.array and generally as.array and as.data.frame to deal with any
underlaying data structure of x$val.