the easiest way to achieve this is via npc configuration. create a text file in your level folder and name it "npc-id.txt". (without the quotation marks, replace id with the id of the npc, for example if you want every thwomp to be affected you'd want 3 files for ids 295, 435 and 437)
then, place the following inside:
this will make thwomps trigger switch blocks, and it will also make them break through certain blocks like smw turn blocks.
for more details you can go
here and ctrl+f for "thwomps"