Ruby 2.7.4, 56 54 bytes
->(a,l){a.filter_map.with_index{|_,i|a[i..].index(l)}}
Filter maps over the array and finds the index of the target offset from the current index.
Excited to have gotten my first Golf!
->(a,l){a.filter_map.with_index{|_,i|a[i..].index(l)}}
Filter maps over the array and finds the index of the target offset from the current index.
Excited to have gotten my first Golf!