Variables in arrays

When making a square pattern of an existing feature, can the lengths "D1" and "D2" be expressed as links to variables defined as an equation, in the same way that dimensions can?

SolidworksParts And Features