Did this myself just a week ago.
You can use an array to be the heap by accessing certain indexes based on formulas.
To get a parent of index i, subtract 1 and divide by 2.
To get each child, double index i and add 1 or 2. you need to verify that each index is valid, or the index does not have any children or just 1.
Child 1 = i2+1, child 2 =i2+2
Add to the heap by adding at the last index and perform a bubble operation.
When pulling from the heap, grab index 0 and replace it with the last member, then perform a bury operation.
Update a member by updating its value and bubble it, since it will only be updated if it has a better value. You’ll want the member to know its index in the heap.
Bubble involves getting the parent and comparing their values. If Current has better value, swap the members.
Bury involves comparing Current with each child and swap with the best value child if needed.
Swap by setting the array element with the other member, and also updating the member with its new position in the array.
I can provide more details but that’s the overview and hopefully it will be enough. Since if I show screenshots of my setup, it can differ for how you handle the nodes. For example, I don’t reference the nodes but wanted a pure data approach. It’s also unfinished and riddled with debugging nodes. I’ll tell you, debugging the heap is the worst.