#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  cin.tie(0)->sync_with_stdio(0);
  long long T;
  cin >> T;
  while (T--) {
    long long n;
    cin >> n;
    long long a[n], cnt = 0;
    for (long long i = 0; i < n; i++) {
      cin >> a[i];
      cnt += a[i];
    }
    vector<long long> ans;
    function<void(long long)> go = [&](long long i) {
      if (a[i] == a[i + 1] and a[i + 1] == a[i + 2]) {
        return;
      }
      long long x = a[i] ^ a[i + 1] ^ a[i + 2];
      a[i] = a[i + 1] = a[i + 2] = x;
      ans.push_back(i);
    };
    if (cnt % 2) {
      cout << "NO\n";
      continue;
    }
    long long pos = 0;
    while (a[pos] == 1 and pos < n - 2) {
      go(pos);
      pos += 2;
    }
    if (a[pos] == 1) {
      cout << "NO\n";
      continue;
    }
    for (long long i = pos - 2; i >= 0; i -= 2) {
      go(i);
    }
    while (a[pos] == 0 and pos < n - 2) {
      if (a[pos + 1] == 1 and pos + 3 < n) {
        go(pos + 1);
      }
      if (a[pos + 1] == 1) {
        go(pos);
      }
      pos++;
    }
    cout << "YES\n" << ans.size() << '\n';
    for (auto i : ans) {
      cout << i + 1 << ' ';
    }
    cout << '\n';
  }
}
