if(Serial.available()==0){ // Do nothing if there is no data to read
goto esc;
}
If there is serial data to read, do it. Get rid of the stupid goto and label.
char trash[64]; // local buffer to collect any erroneous data before SOP
A hoarder, huh? Why do you need to save trash?
char and byte are the same size. The Serial methods make no attempt to interpret the data. So, if the function is defined to take an array of chars, and you are sending an array of bytes (containing values in the 0 to 255 range), create a byte array and use a cast in the call to readBytesUntil().