redimension function

redimension array, or collapse attributes into a new dimension