Change GPIO Function from in <>out

Hi,

im using octoprint on my ender 3 with a raspberry pi 4. i installed a 10 physical button box and already connected all buttons to the gpio pins with an old 40pin HDD-computer cable.
I idiot have now connected some buttons to the out pins of the raspberry.
is there an easy way to put some pins from the out function to the in function?