Certainly J.R.R. Tolkien was very much aware of the Arthurian tradition that existed during the medieval period and even earlier, especially as depicted by Thomas Mallory in Le Morte d'Arthur. The affinities of the characters of Aragorn and Gandalf with Arthur and Merlin are too obvious not to notice, yet transformed in such a way by Tolkien that they are infused with new meaning and purpose. It is this transmogrification that connects Tolkien's work with the past and provides the palimpsest for the world he creates in his epic adventure depicted in The Hobbit and The Lord of the Rings. An examination of the specific details of this process enlightens the readers, and enlivens and exfoliates the text.
Hall, Mark R.
"Gandalf and Merlin, Aragorn and Arthur: Tolkien's Transmogrification of the Arthurian Tradition and Its Use as a Palimpsest for The Lord of the Rings,"
Inklings Forever: Vol. 8
, Article 6.
Available at: https://pillars.taylor.edu/inklings_forever/vol8/iss1/6