Himavan to Dundubhi (re: Vali's strength):
https://www.valmikiramayan.net/utf8/kish/sarga11/kishkindharoman11.htm#Verse11
"Oh, war-expert Dundubhi, Indra's son is there, a brave and glorious one by name Vali, and he is now presiding over the matchlessly pompous city Kishkindha. [4-11-21]
"He is a highly intelligent one and a war-expert too, and he is the capable one to give you a duel, like Indra to Namuchi. [4-11-22]
"Approach him promptly if you desire a fight now, and he is an intrepid one who will always be in the manoeuvres of war, and indeed none can assail him." Thus said Himavan to that demon Dundubhi. [4-11-23]
In Manusmriti we have:
https://www.wisdomlib.org/hinduism/book/manusmriti-with-the-commentary-of-medhatithi/d/doc200758.html
Section VIII - Duties in Battle (saṅgrāma)
Nor one who is sleeping, nor him who is without his armour, nor one who is naked, nor one deprived of his weapons, nor one who is only looking on and not fighting, nor one who is engaged in fighting with another person;—(92)
The same is repeated by Hanuman in Yuddhakanda:
https://www.valmikiramayan.net/utf8/yuddha/sarga59/yuddhasans59.htm#Verse73
Meanwhile, Hanuma of exalted mind, burning with courage, regained his breath and in his martial ire cried out furiously towards Ravana, the Lord of Demons who occupied in fight with Nila as follows: "It is not proper to engage in a combat with a person who is already doing a fight with another."
The conclusion is inevitable, Rama-Sugriva duo wanted to eliminate Vali (who was invincible in a face-to-face battle) by whatever means possible. Shooting an arrow hiding behind a tree was the easy option. Interestingly, Hanuman who was standing next to Rama when Vali was being killed didn't utter a single word about the morality of the whole incident.