Filter class arrays before imploding