Install packages with pacman to an alternative location

I am running Arch linux and have limited space on my root partition. I would like to install some packages to an alternative location than the default /usr/* directory, but I can’t find any clear info stating this can be done. I’ve seen the -r flag on pacman -S but it’s unclear what purpose it is actually designed for as it mentions that it is not appropriate for installing things to /usr/local. Since I can’t really find any info on achieving what I’m looking to do, I can’t tell if this recommendation is focused more on not misusing the /usr/local directory or if it’s talking about not using it to arbitrarily install software elsewhere as a whole.

What is the recommended way of installing packages from the primary repos (not the AUR) to alternative locations?