My phone (Sense 5) has an import/export option in the contacts app's settings (view "people" then bring up the settings, select manage contacts, then import/export. However, it doesn't have the option to export all, I'd have to tick the ones I wanted.
Mind you, the SIM wouldn't be able to store all of my contacts anyway, so I'd need to make a selection regardless. SIM contact storage is very limited compared to the phone's.