Device and methods for controlling pH or ionic gradient comprising a multisite array of feedback electrode sets comprising electrodes and pH sensing elements. The electrodes can include a reference electrode, counter electrode, and a working electrode. The device and methods iteratively select an amount of current and/or voltage to be applied to each working electrode, apply the selected amount of current and/or voltage to each working electrode to change pH of a solution close to the working electrode, and measure the signal output of the sensing element. The multisite array can include feedback and non-feedback electrode sets.