I was looking for something on the blockchain explorer, and I found some transactions that share inputs from both P2SH addresses (starting with 3) and Bech32 addresses (starting with bc1). My question is, is it possible that both types of addresses come from the same wallet or is there some other explanation for this type of transaction?
Since you found it on the blockchain explorer, the answer should be yes, and therefore the type of wallet (the code) is what gives you the option to insert a bc1 address or not.
For example, coinomi enables you to create three addresses.
So how will fees be calculated? Adding P2PKH addresses will increase the fees, which is one of the most important reasons for using P2SH & Bech32>