Simple peak finder solution - O(log n)
Slicing a list, as in leftArray = input[:middleIndex], creates a copy and takes \$O(n)\$ time. You can avoid that by passing the whole list together with left and right indices as function arguments.
Another problem with the slicing approach is that you need to look at three values to recognize the peak, but the slices can become shorter than three elements.
Python's chained comparison would be handy here:

middleIsMax = input[middleIndex - 1] &lt; input[middleIndex] &gt; input[middleIndex + 1]