It is clear from the very beginning of the story that the death of Doodle is long foreshadowed in the story. Although the story begins with the remembrance of the scarlet ibis visiting the family, there are clear elements of foreshadowing, with reference to summer being "dead" and "rotting brown magnolia petals" and the tree where the ibis landed is described as "bleeding". This choice of diction serves to create a dying image even before we are introduced to Doodle.
From birth, the author shows that Doodle was expected to die an early death:
He seemed all head, with a tiny body which was red and shrivelled like an old man's.
It is because of this that Daddy, Doodle's father, asks the carpenter to build a "little mahogany coffin" for Doodle. Although he doesn't die, this coffin is something that the narrator uses later to taunt Doodle with, and the fact that the narrator says about the name they choose to give him, William Armstrong, that "Such a name sounds good only on a tombstone" clearly continues the foreshadowing of Doodle's early demise.
Hope this helps! You might like to continue to analyse the story to discover other elements that build this overwhelming image of death and suffering.