Initializing MapboxGL.js within a single page app

yep! the values you can pass as properties are in the set of anything you can represent as a Json.Encode.Value, which includes arrays and objects.