Recently there was this change, that Python version updated in arch repo. I may have messed my config a little bit in the past, by using pyenv, but it should be back to normal.
How does yay knows, where to install python packages?
Depending on the packages you install, they rely on different versions of python. It is up to the package maintainer to upgrade their packages. Therefore you cannot do much about it.
In case of missing python-dependencies (modules) it is up to you to look which are missing, and install them to the proper python version folder, I guess.
That is an AUR package. That means you build it on your machine and as a result it uses the Python version you have on your machine at the time.
powerline is a repo package. This means the maintainer builds it for you and it will install the files where they are in the package.
However, python-powerline looks to be correct to me in the repos. This probably means you have the wrong version installed. The current version is 2.8.3-2