TeX - 207 183 bytes
\def\a#1 #2 #3 #4 {\ifnum#2#1#3\def\e{#3 #4 #2 }\else\def\e{#2 #4 #3 }\fi\e}\def\b#1 #2 #3 {\a< #1 #2 \a> #3 {} }\def\c#1 #2 {\ifnum#1=#2\let\b\f\def\d#1 {#1 \c}\else\let\d\b\fi\d#1 #2 }\def\f#1 #2 {#2 #1 }
This is the best I can do with a language that doesn't really have data structures, or many builtins.
The approach is to take the first three numbers we find, and do a broken sort as follows: Sort the first two by greater, and then take the second two by lesser. This should always result in our list being unsorted. It's convenient to ignore anything but the first 3 unique inputs.
We also have a check for two of the same number in a row. In that case, we scan ahead until we find a different number, and then switch the two, ensuring that our list is out of order.
I'm gonna work on golfing this down, but it's the best approach I can think of.
EDIT: Considerable work has been put in to this, to make it more golfy and also actually work. So here it is:
\let~\def~\a#1 #2 {\if^#2~\e{\box9 #1 }\else\ifnum#1\h#2~\e{\hbox{#1 }\a#2 }\else~\e{\hbox{#2 }\a#1 }\ifnum#1=#2~\h{=}\setbox9=\lastbox\fi\fi\fi~\g{>}\e}~\g{<}~\h{\g}\everypar{\a}\x^
I changed the the method from inserting things into the input to one where we recurse, replaced \expandafter with \everypar, and added that when it finds an equal number, it grabs the last number typeset and saves it until the second to last slot, ensuring that 1 2 2 (the case that secretly broke the previous answer) will be incorrectly sorted as 2 1 2.
This is just a function, to properly use it you need to: have input stored on the variable \x (or you could type in a list of numbers, with a ^ as a delimeter).
If you'd really like to try this, then do this
\read1to\x
before the lines of this function.
[2,[1,3]]
. \$\endgroup\$