Fill in an increasing sequence with as many numbers as possible
Haskell, 41 bytes

f takes a list and returns a list, with 0 representing ?s.



f=scanr1 min.tail.scanl(#)0
m#0=m+1
_#n=n


Basically, first scan list from left, replacing 0s by one more than the previous element (or 0 at the start); then scan from right reducing too large elements to equal the one on their right.

Try it online! (with wrapper to convert ?s.)