This is called bibliomancy: chancing upon a verse in the Torah and interpreting it as a suggestion for a course of action. It is allowed because of the special status of the Torah in our lives. What better way to make it unplanned than asking a random child what verse he is learning?
The Rambam said: “If one asks a child, ‘What verse are you learning?’ and ...
Mahartaz Chayus says (Rosh Hashana 4a) that it is perplexing why the Talmud (ibid.) refers to one of the psalm’s authors as prophet. He goes on to say that Tehilim is not said with nevuah only with ruach hakodesh.
Ibn Ezra says that the doxology that closes T'hilim 89 is David Hamelech's reaction to a messianic prophecy:
בָּר֖וּךְ ה' לְ֝עוֹלָ֗ם אָ֘מֵ֥ן וְאָמֵֽן׃
. . . about which he comments
הטעם שראה המשורר ברוח הקודש ביאת המשיח, על כן נתן הודות לשם.
This explanation may arise from a need to identify the motivation for this otherwise incongruously exultive ...
"He [G-d] who is everlasting, constant, and in no way subject to change; immutable in His Essence, and as He consists of nought but His Essence, He is mutable in no way whatever; not mutable in His relation to other things: for there is no relation whatever existing between Him and any other being, as will be explained below, and ...