This is an old exam question.
Under what condition on (V, E) should we implement the min-priority queue of Prim's algorithm using an array (indexed by the vertices) rather than a heap (with logarithmic-time implementations of both the Extract-Min and Decrease-Key operations)?
Under what condition on (V, E) should we implement the min-priority queue of Prim's algorithm using an ordered array?
When E is large, it's better to use a heap for the priority queue as we will have many nodes in the queue. It will take time to find min/remove min from an array O(n)/O(n), while a heap only takes O(1)/log(n).
If E is small, we will have few nodes in the queue and thus, to find min and remove it from the array will not need a lot of operations in this case. In this using a heap will not be necessary and it might even be slower than an array due to operations needed to build the heap.