Several of these passages involve foretelling of the future, in a manner not unlike later Marian apparitions.
By analogy, biblical accounts of “appearances” or visions or dreams of those who have died, are of the same essential nature as a Marian apparition. Angels (i.e., also creatures like men) might also be included in such a survey, but stories of angels are relatively well-known, and for the sake of closer analogy and brevity, I have selected only passages with men or the appearance of men.
Several of these passages involve foretelling of the future, in a manner not unlike that of the apparitions at Fatima in 1917. And several actual historical figures are named as appearing after death (Samuel, Onias, Jeremiah, Moses, and Elijah). All passages are RSV (italics for emphasis added).
1 Samuel 28:12-14, 19 When the woman saw Samuel, she cried out with a loud voice; and the woman said to Saul, “Why have you deceived me? You are Saul.”  The king said to her, “Have no fear; what do you see?” And the woman said to Saul, “I see a god coming up out of the earth.”  He said to her, “What is his appearance?” And she said, “An old man is coming up; and he is wrapped in a robe.” And Saul knew that it was Samuel, and he bowed with his face to the ground, and did obeisance. . . .  . . . [Samuel speaking] “the LORD will give Israel also with you into the hand of the Philistines; and tomorrow you and your sons shall be with me; the LORD will give the army of Israel also into the hand of the Philistines.”
Ezekiel 40:3-4 When he brought me there, behold, there was a man, whose appearance was like bronze, with a line of flax and a measuring reed in his hand; and he was standing in the gateway.  And the man said to me, “Son of man, look with your eyes, and hear with your ears, and set your mind upon all that I shall show you, for you were brought here in order that I might show it to you; declare all that you see to the house of Israel.”
Daniel 8:15-17, 19 When I, Daniel, had seen the vision, I sought to understand it; and behold, there stood before me one having the appearance of a man.  And I heard a man’s voice between the banks of the U’lai, and it called, “Gabriel, make this man understand the vision.”  So he came near where I stood; and when he came, I was frightened and fell upon my face. But he said to me, “Understand, O son of man, that the vision is for the time of the end.” . . .  He said, “Behold, I will make known to you what shall be at the latter end of the indignation; for it pertains to the appointed time of the end.”
Daniel 10:4-7 On the twenty-fourth day of the first month, as I was standing on the bank of the great river, that is, the Tigris,  I lifted up my eyes and looked, and behold, a man clothed in linen, whose loins were girded with gold of Uphaz.  His body was like beryl, his face like the appearance of lightning, his eyes like flaming torches, his arms and legs like the gleam of burnished bronze, and the sound of his words like the noise of a multitude.  And I, Daniel, alone saw the vision, for the men who were with me did not see the vision, but a great trembling fell upon them, and they fled to hide themselves. (cf. 10:8-21, with talking back and forth and prophetic reference to future events: 10:14)
Sirach 46:19-20 Before the time of his eternal sleep, Samuel called men to witness before the Lord and his anointed: “I have not taken any one’s property, not so much as a pair of shoes.”And no man accused him.  Even after he had fallen asleep he prophesied and revealed to the king his death, and lifted up his voice out of the earth in prophecy, to blot out the wickedness of the people.
2 Maccabees 5:2, 4 And it happened that over all the city, for almost forty days, there appeared golden-clad horsemen charging through the air, in companies fully armed with lances and drawn swords — . . .  Therefore all men prayed that the apparition might prove to have been a good omen.
2 Maccabees 10:29 When the battle became fierce, there appeared to the enemy from heaven five resplendent men on horses with golden bridles, and they were leading the Jews.
2 Maccabees 15:11-14 . . . a dream, a sort of vision, which was worthy of belief.  What he saw was this: Onias, who had been high priest, a noble and good man, of modest bearing and gentle manner, . . . was praying with outstretched hands for the whole body of the Jews.  Then likewise a man appeared, distinguished by his gray hair and dignity, and of marvelous majesty and authority.  And Onias spoke, saying, “This is a man who loves the brethren and prays much for the people and the holy city, Jeremiah, the prophet of God.” (Jeremiah talks to Judas in 15:15-16)
Matthew 17:3-4 And behold, there appeared to them Moses and Eli’jah, talking with him.  And Peter said to Jesus, “Lord, it is well that we are here; if you wish, I will make three booths here, one for you and one for Moses and one for Eli’jah.” (cf. Mk 9:4-5)
Matthew 27:52-53 the tombs also were opened, and many bodies of the saints who had fallen asleep were raised,  and coming out of the tombs after his resurrection they went into the holy city and appeared to many.
Acts 16:9 And a vision appeared to Paul in the night: a man of Macedo’nia was standing beseeching him and saying, “Come over to Macedo’nia and help us.”