The Messianic corner stone prophecies appear in various places and became a recognised metaphor in the OT. Further, if we accept that the book of Job is quite early, we can also see them, nascent, even in Job but more fully developed later in Psalms and Isaiah.
- Job 38:16 asks who laid the corner stone?
- Psalm 118:22 - The stone the builders rejected has become the cornerstone.
- Isa 28:16 (almost) answers Job's question above, "So this is what the Sovereign LORD says: "See, I lay a stone in Zion, a tested stone, a precious cornerstone for a sure foundation; the one who relies on it will never be stricken with panic."
- Zech 10:4 predicts that the Corner Stone will arise from the tribe of Judah, "From Judah will come the cornerstone, from him the tent peg, from him the battle bow, from him every ruler.
This metaphor, and the fulfilment of all these prophecies is answered in numerous places in the NT and always related to Jesus. See Matt 21:42, Mark 2:10, Luke 20:17, Acts 4:11, Eph 2:20, 1 Peter 2:6, 7.
In almost all cases the corner stone concept is a Messianic reference to Jesus as the foundation of God's people. (Jer 51:26 is the obvious exception.) It is part of a broader metaphor which equates God's people to a building or sacred temple of which were are all part (ie, stones in the building) and Messiah/Jesus is the foundation of corner stone - see 1 Cor 3:10-17, Isa 28:16, 17, etc. (A closely related idea is Jesus as the Rock; Isa 44:8; Deut 32:3,4,15; Ps 92:15 and 1 Cor 10:4.)
I also note that Isa 28:16 is listed as the source of the allusion used in many of the NT verses in the appendix of UBS5 and in the footnote of the NT text itself.