Salaam,
The "jinn" and "shayateen" associated with Solomon were not metaphysical entities or aliens from another dimension. They were actual people.
38:37 As also the evil ones, (including) every kind of builder and diver,-
|والشياطين - And the devils,| كل - every| بناء - builder| وغواص - and diver,|
38:38 As also others bound together in fetters.
|وآخرين - And others| مقرنين - bound| في - in| الأصفاد - chains.|
34:12 And to Solomon (We made) the Wind (obedient): Its early morning (stride) was a month's (journey), and its evening (stride) was a month's (journey); and We made a Font of molten brass to flow for him; and there were Jinns that worked in front of him, by the leave of his Lord, and if any of them turned aside from our command, We made him taste of the Penalty of the Blazing Fire.
|ولسليمان - And to Sulaiman,| الريح - the wind -| غدوها - its morning course| شهر - (was) a month| ورواحها - and its afternoon course| شهر - (was) a month,| وأسلنا - and We caused to flow| له - for him| عين - a spring| القطر - (of) molten copper.| ومن - And [of]| الجن - the jinn| من - who| يعمل - worked| بين - before him| يديه - before him| بإذن - by the permission| ربه - (of) his Lord.| ومن - And whoever| يزغ - deviated| منهم - among them| عن - from| أمرنا - Our Command,| نذقه - We will make him taste| من - of| عذاب - (the) punishment| السعير - (of) the Blaze.|
34:13 They worked for him as he desired, (making) arches, images, basins as large as reservoirs, and (cooking) cauldrons fixed (in
their places): "Work ye, sons of David, with thanks! but few of My servants are grateful!"
|يعملون - They worked| له - for him| ما - what| يشاء - he willed| من - of| محاريب - elevated chambers| وتماثيل - and statues| وجفان - and bowls| كالجواب - like reservoirs| وقدور - and cooking-pots| راسيات - fixed.| اعملوا - "Work,| آل - O family| داوود - (of) Dawood!| شكرا - (in) gratitude."| وقليل - But few| من - of| عبادي - My slaves| الشكور - (are) grateful.|
34:14 Then, when We decreed (Solomon's) death, nothing showed them his death except a little worm of the earth, which kept (slowly) gnawing away at his staff: so when he fell down, the Jinns saw plainly that if they had known the unseen, they would not have tarried in the humiliating Penalty (of their Task).
|فلما - Then when| قضينا - We decreed| عليه - for him| الموت - the death,| ما - not| دلهم - indicated to them| على - [on]| موته - his death| إلا - except| دابة - a creature| الأرض - (of) the earth| تأكل - eating| منسأته - his staff.| فلما - But when| خر - he fell down,| تبينت - became clear| الجن - (to) the jinn| أن - that| لو - if| كانوا - they had| يعلمون - known| الغيب - the unseen,| ما - not| لبثوا - they (would have) remained| في - in| العذاب - the punishment| المهين - humiliating.|
21:82 And of the evil ones, were some who dived for him, and did other work besides; and it was We Who guarded them.
|ومن - And of| الشياطين - the devils| من - (were some) who| يغوصون - would dive| له - for him| ويعملون - and would do| عملا - work| دون - other than| ذلك - that.| وكنا - And We were| لهم - of them| حافظين - Guardians.|
27:17 And before Solomon were marshalled his hosts,- of Jinns and men and birds, and they were all kept in order and ranks.
|وحشر - And were gathered| لسليمان - for Sulaiman| جنوده - his hosts| من - of| الجن - jinn| والإنس - and the men| والطير - and the birds,| فهم - and they| يوزعون - (were) set in rows.|
The jinn/shayateen in many of the ayats are described as builders and divers. Solomon lived in Israel and was famous for having the first temple constructed under his reign. He was given aid in the construction of this project by Hiram I, who was the king of Tyre.
https://en.wikipedia.org/wiki/Hiram_Ihttps://en.wikipedia.org/wiki/Solomon's_TempleTyre was one of the main cities of Phoenicia which was a major civilisation during this period. The Phoenicians were famous for ship-building and were well known for their maritime capabilities.
http://www.ancient.eu/article/897/They helped Solomon strengthen his kingdom as a maritime power and shared their knowledge of the sea with him. This is how the wind was made subject to Solomon in 38:36, 21:81 and 34:12
http://stevenmcollins.com/html/did_ancient_israel_fear_the_se.htmlBeing skilled architects and renowned artisans they were sent by Hiram I to build the palace for king David and later, the temple of Solomon. The raw material e.g cedar wood, metals and glass were provided by them as well.
http://phoenicia.org/temple.htmlSome of the labour force used for the construction of the temple may well have been slave labour since 38:38, 34:12 and 34:14 point to this.
http://biblehub.com/commentaries/guzik/commentaries/1402.htmhttp://quranaissance.comThese were not the only accomplishments of the Phoenicians. They had a monopoly on extracting purple dye from sea snails known as murex. This was such an expensive dye that only royalty wore it. In order to extract the dye from the murex they would have to dive and gather huge amounts of the sea snails.
https://en.wikipedia.org/wiki/Tyrian_purplehttps://books.google.com.pk/books?id=Hpa7BwAAQBAJ&pg=PA122&lpg=PA122&dq=phoenician+murex+divers&source=bl&ots=vHFxzPuGsj&sig=9rApqU_FOvE8cjurWwEx1MS6_qo&hl=en&sa=X&ved=0ahUKEwiU3rLbrMHQAhWJvxQKHVbdCp0Q6AEIPDAG#v=onepage&q=phoenician%20murex%20divers&f=falseIn conclusion, the people who worked for Solomon were builders and divers who taught him knowledge of the sea.
Regards,
Janet.