Defining Initial Parameters For Modifiers

So I’ve got a script that creates 60 cubes and each time it creates a cube it adds an array modifier and a curve modifier. I want to be able to initialize the array modifier with a count of 20 and a relative offset of z 1.5. I want to initialize the curve modifier with a parameter that points to some circles which I have creating before the cube. Anywaaayyyyy After I add the modifier to the active object with bpy.ops.object.modifier_add(type=‘ARRAY’) how to I input the parameters I want for the modifier?

Use RNA not operators:

ob = bpy.data.objects["Cube"]
mod = ob.modifiers.new("", "ARRAY")
mod.count = 20
mod.relative_offset_displace = (0, 0, 1.5)