1D Hopping Array Maze
JavaScript (ES6), 117 bytes
Returns an array of 0-indexed intermediate and final points, or an empty array if no solution exists.
a=&gt;(g=(x,p,d=a[x])=&gt;1/d?[d,-d].map(d=&gt;p.includes(X=x+d)||g(X,[...p,X])):o=o==''|o[p.length]?p:o)(a.length&gt;&gt;1,o=[])&amp;&amp;o

Try it online!
Commented
a =&gt;                              // given the maze a[]
  (g = (                          // g = recursive function taking:
    x,                            //   x = current position
    p,                            //   p[] = list of visited cells
    d = a[x]                      //   d = value of current cell
  ) =&gt;                            //
    1 / d ?                       // if d is defined:
      [d, -d].map(d =&gt;            //   for d and -d:
        p.includes(X = x + d) ||  //     if the cell at X = x + d was not yet visited,
        g(X, [...p, X])           //     do a recursive call to g() at this position
      )                           //   end of map()
    :                             // else:
      o =                         //   update o:
        o == '' |                 //     if o was empty
        o[p.length] ?             //     or p is shorter than o:
          p                       //       set o to p
        :                         //     else:
          o                       //       let o unchanged
  )(a.length &gt;&gt; 1, o = [])        // initial call to g(), starting in the middle
  &amp;&amp; o                            // return o