store the arraysize in the object

Change-Id: Ic7be9b1a5bf64491719d6aaadfac503dafed3045