is there a syntax like this?
:local badip {192.168.0.2;192.168.0.5};
/ppp active remove [find address in badip];
There is no such syntax
You can use following code
:local badip {192.168.0.2;192.168.0.5};
:foreach i in=$badip do={
/ppp active remove [find address=$i];
}