All kinds of action can be taken out of combat
Combat is just a construct to help gameplay zoom in when a lot of things are happening at the same time. The PHB expains this on page 189:
Combat in D&D can be chaotic, deadly, and thrilling. This chapter provides the rules you need for your characters and monsters to engage in combat. (...) The game organizes the chaos of combat into a cycle of rounds and turns.
Bonus actions are not the only actions that you can only "take on your turn". The PHB says on page 192:
When you take your action on your turn, you can take
one of the actions presented here
and then proceeds to list actions such as "Cast a Spell", "Hide", "Search" and "Use an Object".
There is the proof by reductio ad absurdum SSD is making: if you could not take these actions also outside of combat, outside combat you could not cast cure wounds or any other spell. Or drink a potion. Or remove something from your backpack. Or Run. Or Hide. Or Search for secret doors. And so on.
So in general, you can do anything you can do in combat also out of combat. Except for actual fighting.