Engineering spatial coherence in lattices of polariton condensates