Welcome to Algorand!
When you create a group, you specify the order of the transactions.
The groupIndex is implicitly derived from this order.
For example, if you group txA, txB, txC in this order. Then txA has groupIndex 0, txB has groupIndex 1, and txC has groupIndex 2.
txn always refers to the current transaction executing the smart contract/smart signature.
So if you have a group of 3 application call transactions tx0, tx1, tx2:
- in the application call tx0, then
txn corresponds to tx0
- in the application call tx1, then
txn corresponds to tx1
- in the application call tx2, then
txn corresponds to tx2
No.
But also note that lsig or smart signatures are really reserved for advanced use cases nowadays. Most dApps would only use smart contracts and the sender can be any account (including a smart signature account but this is another story).