You could, though it would be more efficient to find the matching lpp object first and then find its shapes, then iterate over those shapes to change the layer and purpose. I don't have an example to hand, but it would be something like the following:
m1lpp = car(setof(lpp geGetEditCellView()~>lpps lpp~>layerName=="M1" && lpp~>purpose=="drawing"))
foreach(shape m1lpp~>shapes shape~>lpp=list("M2" "drawing"))
Typically the number of shapes to process is an order of magnitude or more greater than the number of distinct layer-purpose pairs, hence the probable efficiency gain. YMMV depending on the design of course.