Separate from Serial for digitalWrite()

The Serial input basics have a demo-code in post 2

where a start-marker and an end-marker is used to separate commands from each other.

So if you can change the character-sequence that you are sending to the arduino to look like this

<LED1ON><LED2OFF><LED3BLINK><LED4ON>

where the "<" acts as the startmarker and the "<" acts as the endmarker,
each time the end-marker is received the flag newData becomes true and you can process this one command. And then continue with reading from the serial inputbuffer.

Depending on how much characters you want to send at once you must iterate through your whole code very fast. Otherways if the number of sended characters exceeds the number the serial receive-buffer can hold some characters will get lost.

best regards Stefan