Improve generating cloud variables

Basic handling of Array types and ability to provide own way to format values to String.