A lattice structure on code metrics and beyond f-vectors of matroids