As of EFCore 9 there is a .ToHashSetAsync() methods in case you need to lookup the results many times.
.ToHashSetAsync()
Sources is very much the same as .ToListAsync() (not as in .ToArrayAsync() with List->Array conversion)
.ToListAsync()
.ToArrayAsync()
Docs