Write a function that performs one step of value iteration for a given Markov Decision Process (MDP) using the Bellman equation. The function should update the state-value function V(s) for each state based on possible actions, transition probabilities, rewards, and the discount factor gamma.
transitions[s][a] is a list of (prob, next_state, reward, done) tuples, one per possible outcome of taking action a in state s. Return a new array with
where the term is dropped when done is True (the episode ends there). Every state is updated from the input V (a synchronous sweep, not in place). Only use NumPy.