Why are the vertices of the faces not moved with transformation? Is there any way around this?

I was also going to say the same.

As well as … since PCB design software and even manual layout uses component decals, you should likely be doing the same thing in your extension. Ie, your extension would have a library of via components that you’ll instantiate into the model, into a “layer” group’s entities collection, at a specific transformation. (“Layer” here is in the PCB-sense, as in “solder side layer” etc.)

This is how I would do it. I would not waste time trying to draw pads, pad arrays and vias using code.
Instead I’d manually draw them using SketchUp at a higher scale using the “Dave Method” and save them out into a local component definition library.

The extension would use the DefinitionList#load and Entities#add_instance methods to place PCB components into the model.