How can I store structs, arrays and mappings in PyTeal?

On problem 2, most structs, lists, etc can be converted to byte arrays which can be stored in local or global state. That said, writing teal or Pyteal to manipulate or read the structs inside the contract can be difficult. The Beaker project implements some key functionality that makes handling this a lot easier. Note that with any smart contract you are limited to Global or Local state. This is not much (global 64 k/v pairs, local 16 k/v pairs). That said Boxes will be coming to Algorand smart contracts very soon and you will be able to use as much storage as you want in your contract, if you are willing to up your minimum balance requirements. I would suggest you look at the beaker project which is documented here:
https://algorand-devrel.github.io/beaker/html/usage.html

And a specific example of storing structs in local state here:

You may also want the PyTeal docs as well:
https://pyteal.readthedocs.io/

1 Like