Implement getKneighborsConnections better
Signed-off-by: Dongwoo Arthur Kim <kimdwkimdw@gmail.com>

# What does this PR do ?

Removing `for statement` and optimizing `getKneighborsConnections`

# Changelog 
- https://github.com/NVIDIA/NeMo/pull/5976/files#diff-4188601503d6fb6ce4e990e5148c6c02e57660f95043a149b69b485d492c68b6L314-R318
  - Just simple optimized operation

# Usage
Nothing to be different as before.

# Before your PR is "Ready for review"
**Pre checks**:
- [x] Make sure you read and followed [Contributor guidelines](https://github.com/NVIDIA/NeMo/blob/main/CONTRIBUTING.md)
- [x] Did you write any new necessary tests?
- [x] Did you add or update any necessary documentation?
- [x] Does the PR affect components that are optional to install? (Ex: Numba, Pynini, Apex etc)
  - [x] Reviewer: Does the PR have correct import guards for all optional libraries?
  
**PR Type**:
- [x] New Feature
- [x] Bugfix
- [ ] Documentation

If you haven't finished some of the above items you can still open "Draft" PR.


## Who can review?

Anyone in the community is free to review the PR once the checks have passed. 
[Contributor guidelines](https://github.com/NVIDIA/NeMo/blob/main/CONTRIBUTING.md) contains specific people who can review PRs to various areas.

This is a part of ASR, diarizer.
@titu1994 @redoctopus, @jbalam-nv, or @okuchaiev

# Additional Information
* Related to # (issue)
