Duncan and Mary were living in Glenelg in 1841 ( in a property called Mallaig)
The parish of Glenelg is very extensive, and it includes the north shore of Loch Morar.
The Macmaster household is one of four enumerated together in Enumeration District 7 in the 1841 census. Other places in the same ED include Kinlochmorar, Stoule, Bracora, Beorad, Tarbet, Ardintigh, Swordland, Brinicory, Glasnacardoch and Buorblich, all of which can be found on the First Edition of the six-inch Ordnance Survey Map and most of which are still named on the modern 1:25,000 Ordnance Survey map.
Mallaig, in particular, is shown on that map as a crofting township a little to the east of the present town and port of the same name. See
https://maps.nls.uk/geo/explore/side-by-side/#zoom=15.4&lat=57.00900&lon=-5.81417&layers=5&right=ESRIWorld. The 1865 Valuation Roll records that Lord Lovat was proprietor of Mallaig.
All the other McMasters in the parish of Glenelg are at Ellenreoch, which is Eileanreach, a short distance south of the Kirkton of Glenelg. See
https://maps.nls.uk/geo/explore/side-by-side/#zoom=15.9&lat=57.20030&lon=-5.63259&layers=5&right=ESRIWorldIn the mid-19th century the only sensible way to get from Ellenreoch to Mallaig was by boat.
The shortest alternative route today if you don't have access to a boat would be by the Glenelg-Kylerhea ferry
https://skyeferry.co.uk/times-fares/, then down through Skye to Armadale and the ferry to Mallaig. If the Glenelg-Kylerhea ferry isn't running it would involve driving over Mam Ratagain to Loch Duich, round the east end Loch Duich, west to Kyle and over the bridge to Skye, then to Armadale and the ferry to Mallaig, which is over 50 miles plus a ferry crossing. (By road only it would be 106 miles via Invergarry on Loch Ness.)