ironically I was wondering if can use arduino to generate static electricity

PaulRogers:
but what I wanted was to generate a static charge in a plate (glass? metal? plastic?) to attract and trap dust....

You can only have a static charge on an insulator or a well insulated conductor. Static voltages are measured
in the kV to 10's of kV range.

Small high voltage low power power supplies are findable, not very common, probably cheapest to caniballize
an insect-zapper unit ?