Create all arrays of non-negative integers of length N with sum of parts equal to T Create all arrays of non-negative integers of length N where the array sum is equal to T. The output order of arrays does not matter.
Possible solutions are e.g.
N = 5, T = 2:  
1 1 0 0 0  
1 0 1 0 0  
1 0 0 1 0
1 0 0 0 1
0 1 1 0 0
0 1 0 1 0
0 1 0 0 1
0 0 1 1 0
0 0 1 0 1
0 0 0 1 1
2 0 0 0 0  
0 2 0 0 0  
0 0 2 0 0  
0 0 0 2 0  
0 0 0 0 2

N = 4, T = 5  
0 4 1 0  
1 1 2 1  
2 0 3 0  
0 3 1 1  
... 

Erroneous outputs would be:
N = 3, T = 1  
1 1 1  
3 0 0  

N = 4, T = 2  
0 1 1
0 2 0 0 0 0

Edit: I sadly do not understand most of these very short code golf languages (but admire the creativity of them). To understand what you mean, main stream languages or explanations are encouraged. (How about Java, C# or C++?)
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