Ruby 2.7.4, 56 bytes
f=->(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!
f=->(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!