Given an array of numbers where all but one number follow a pattern, return a new array with the one number that doesn’t follow the pattern fixed.
The pattern will be one of:
- The numbers increase from one to the next by a fixed amount (addition).
- The numbers decrease from one to the next by a fixed amount (subtraction).
For example, given [2, 4, 7, 8, 10] return [2, 4, 6, 8, 10].