Inline sparse array find first/last