Improved CloudArray creation in samples