preprocess data to get unified meta data array