I know that x86 instructions can have a maximum of 4 bytes of prefixes, e.g Lock, rep, segment overrides etc.
Is there any particular order in which they should appear,
The architecture volume of the intel developer manuals details the layout at lenght, however, from what I remember last time I read it, the order for most didn't matter, except the REX
/REX.W
prefix which must occupy the slot closest to the start of the actual instruction bytes (aka it takes the slot most on the right)