Readout of a quantum state in an array of quantum dots