docs: public boolean arrayAlreadyExistsForVarName(String varName) {
          SDVariable var = getVariable(varName);
          switch(var.getVariableType()){
              case VARIABLE:
                  return variablesArrays.containsKey(varName);
              case ARRAY:
                  long tid = Thread.currentThread().getId();
                  return sessions.containsKey(tid) && sessions.get(tid).contains(varName, InferenceSession.OUTER_FRAME, 0, null);
              case CONSTANT:
                  return constantArrays.containsKey(varName);
              case PLACEHOLDER:
                  return placeholdersPerThread.containsKey(Thread.currentThread().getId()) &&
                          placeholdersPerThread.get(Thread.currentThread().getId()).containsKey(varName);
              default:
                  throw new RuntimeException("Unknown variable type: " + var.getVariableType());
          }
      }