Move array data into its own struct

Re-applying changes from c83b9cdd584c459ecaaae5c04c314aad50585754
in the qtdeclarative repository which were done after beginning to move
the dialogs into qtquickcontrols.

Change-Id: I29798b88268a965aa66ba78f8f730bcac00576af
Reviewed-by: Liang Qi <liang.qi@digia.com>