Pick the four largest numbers in the array, $X \geq Y \geq Z \geq U$, and check for a few cases.
If $X$, $Y$ are not neighbours $\implies$ largest sum is $X + Y$.
Otherwise if $X$, $Z$ are not neighbours $\implies$ largest sum is $X + Z$.
Otherwise ($X$ is between $Y$ and $Z$) $\implies$ largest sum is $\max(Y + Z, X + U)$.
How did I get the solution: Well, the restriction is very mild, so it seemed likely that the largest sum would be found by adding two of the largest numbers. I tried with the three largest numbers, and found that $Y + Z$ could be small compared to $X$ plus the next smaller number, so the largest 4 were needed.