[5.0] Handle Arrays In App::environment() And Add Tests

Arrays are often more convenient to create/manage than an arbitrary number of strings.

Also added unit tests for this method.