Jeremiah 1:5 says:
“Before I formed you in the womb I knew you, before you were born I set you apart; I appointed you as a prophet to the nations.”
When we set out to create something, we usually have in mind what we want to do. If it is a painting, an artist will have a mental picture of what he wants to paint. If it is a designer, he will have pre-conceived the result he wants to achieve. Even before I became a parent, I had in mind what I hoped for my children to be like. I wanted them to love one another, to respect their elders, to get along well with others, etc.
It is therefore not inconceivable that God the Creator knew us before we were even formed in the womb. If we believe that our life originates from God, then we must also believe that our life has a purpose. One does not create something that is of no purpose or value.
I would like to think that everyone of us has a designated purpose. We just have to be aware of what that purpose is and then do our best at what we have been set apart for, all to the glory of God.