applied usage of iterator and push_back for diagnostics_array