2D Navigation Grid for A* Pathfinding C++

I am pretty new to UE4 and C++ and i have to do my final Project with it. I am trying to make my own Navigation Grid for an A* Pathfinding alhorithm. My Problem right now is that i am not sure on how to detect if the Cell is Walkable or not. Right now i have a TArray NavGrid; that i fill with 0 for Walkable. For every Cell i create i also create a UBoxComponent and set its Position according to its position in the Grid.

UBoxComponent* CollisionComponent = NewObject(); CollisionComponent->OnComponentBeginOverlap.AddDynamic(this, &ANavGrid::Overlap); FVector ColisionPosition(X * GridPanelSize, Y * GridPanelSize, 0); CollisionComponent->AddRelativeLocation(ColisionPosition); NavGrid[Pos] = 0;

In the Overlap Function i want to get the Position of the CollisionComponent and Convert that to a Position in the Grid Array. How would i do this? Or is this even a good way to create the Grid for the Pathfinding?