Questions about pinMode

I have a couple of questions about pinMode():

  • Is it allowed to change the pin mode while running (in the loop() function)?
  • What is the “safest” pinMode? What is the pinMode where you have the smallest chance to damage the arduino board?

Yes
INPUT_PULLUP

Thanks!