Stashbox by Peter Csajtai

<PackageReference Include="Stashbox" Version="3.1.1-preview-549" />

 EnumerableExtensions

static class EnumerableExtensions
public static TEnumerable[] CastToArray<TEnumerable>(this IEnumerable<TEnumerable> enumerable)

public static bool ContainsReference<TElement>(this TElement[] array, TElement element)

public static int GetReferenceIndex<TElement>(this TElement[] array, TElement element)

public static IEnumerable<TResult> SelectButLast<TSource, TResult>(this IEnumerable<TSource> source, Func<TSource, TResult> selector)

public static TEnumerable[] WhereOrDefault<TEnumerable>(this IEnumerable<TEnumerable> enumerable, Func<TEnumerable, bool> predicate)