Making Copies Using Components Attributes

Hi there, it’s my first post so ignore any mistakes.
Well, I am a beginner of SketchUp and recently I’ve been playing with Component Attributes. It’s really awesome to know how this works.
I have a question relating to this,
Suppose,
I have a 6"X6" cube with the depth of let’s say 2".
Now I want to make an array of those cubes. Like a 2X3 array or 4X4 array.
I want to program in a ay that in the component options it asks user to put number of cubes in X and number of cubes in Y, and make an array with it.
Is it possible?
Any help would be appreciable.
Thanks