I believe terrain restrictions are in effect for NPCs, but not if they're in your party. For example, I was not able to command a K-4 Security Droid to exit my ship onto mountain terrain, but I was able to add it to my party, exit the ship with it and then kick it from my party so it stood on mountain terrain.