Learning pytensor scan function utilizing a simple population model

This thread also seeks to implement something like a population model, via scan: Constructing a matrix within each step of `pytensor.scan`.