Create all arrays of non-negative integers of length N with sum of parts equal to T
JavaScript (V8),  71 69  67 bytes
Saved 1 byte thanks to @l4m2
Expects (n, t) and prints all possible arrays.

f=(n,t,a=[],v=0)=&gt;n?f(n-1,t,[...a,v])|t&amp;&amp;f(n,t-1,a,v+1):t||print(a)

Try it online!
Commented
f = (             // f is a recursive function taking:
  n,              //   n   = expected number of entries
  t,              //   t   = expected sum
  a = [],         //   a[] = current output array
  v = 0           //   v   = current value to be added to a[]
) =&gt;              //
  n ?             // if there's at least one more entry to add:
    f(            //   do a first recursive call:
      n - 1,      //     decrement n
      t,          //     pass t unchanged
      [...a, v]   //     append v to a[]
    ) | t         //   end of recursive call; yield t
    &amp;&amp;            //   if the above is truthy ...
    f(            //   ... do a 2nd recursive call:
      n,          //     pass n unchanged
      t - 1,      //     decrement t
      a,          //     pass a[] unchanged
      v + 1       //     increment v
    )             //   end of recursive call
  :               // else:
    t || print(a) //   print a[] if t = 0