That method is tedious, and it is much easier to use FIML, which provides the same results. The only reason to use the MGSEM approach (one group per missing-data pattern) is if you do not have access to the raw data, but only the summary statistics in each group/pattern. If you want to implement it, you can just specify the same label across groups, for each parameter in the model:
Graham's chapter assumed software needed to fit the same variables in each group's model, but lavaan is more flexible. You can specify different group's models in different blocks, the same way that different levels (in a multilevel SEM) can different models:
Instead of "level: 1" and "level: 2" in the syntax, you would specify blocks for groups defined by missing-data patterns ("group: 1", "group: 2", "group: 3", etc.).
Terrence D. Jorgensen
Postdoctoral Researcher, Methods and Statistics
Research Institute for Child Development and Education, the University of Amsterdam