Digital inputs problem [duplicate]

I'm designing a digital I/O module which isolated with optocouplers. I'm done with the outputs, but having a confusion about input side.

I will have some switches and sensors to read as inputs, but I don't know how to do the connections, can someone show me as a schematic?

Which pin should be GPIO pin for example?

Edit: The STM32F072C8T6 has a supply voltage of 3.3v nominal. Bypass caps must be installed across Vdd/Vss pins. Make sure BOOT0, VBAT, and NRST lines are handled correctly according to the datasheet.