Flexibly reshape data

WWW: http://had.co.nz/reshape
