(I was surprised to see that I cannot find another thread that discusses this. Perhaps my search-fu is weak...)
The な used for adjectives has a clear historical derivation. This started as に, the adverbial particle, + あり, the classical terminal (sentence-ending) form of modern ある. に + あり then contracted to なり for the terminal form. If a な adjective came at the end of a sentence, in classical Japanese, it would end with なり, as in 山は静かなり。 You might still encounter this form from time to time in poetry.
Classical terminal あり had an attributive form (when modifying another noun) of ある. So に + ある contracted to なる, as in 静かなる山. Again, this form still appears in poetry, especially if the author is trying to evoke an old-fashioned or traditional feel.
As time passed, the なり terminal form disappeared, replaced with the modern だ・です, and the なる attributive form contracted even further into just な.