I am trying to find out if there is a mathematical function which can take n objects and place them in m boxes in a way that is indexed?
For example if I had 3 balls and I wanted them in 4 boxes, the function would generate something like: f_1(3,4) = (1,1,1,0), f_2(3,4) = (1,1,0,1), other f_i(3,4)'s (1,0,1,1),(0,1,1,1),(2,1,0,0),(1,2,0,0),(2,0,1,0),(1,0,2,0),(2,0,0,1),(1,0,0,2),(3,0,0,0),(0,3,0,0),(0,0,3,0), f_N(3,4) = (0,0,0,3).
Then if I wanted a specific permutation I could get f_i(3,4).
First, use combinadics to get an indexing function which, given a nonnegative integer $i$, returns the $i^\text{th}$ subset of $\{1,\dots,m+n-1\}$ whose size is $n$. I described how to do that in this answer.
Then, use the following correspondence to get a placement of $n$ balls in $m$ boxes. I will give a specific example in the case where $n=10$ and $m=100$. Suppose the indexing function from before gives your the subset $$\{3,4,10,11,12,27,104,105,106,107\}$$ of $\{1,2,\dots,109\}$. Decrease the smallest element by $0$, the second smallest element by $1$, and so on, up to decreasing the largest element by $9$. The result is a multiset, which may have repeated elements: $$ \{3,3,8,8,8,22,98,98,98,98\} $$ Finally, for each occurrence of a number, place a ball in the box with that number. For this example, place two balls in box $3$, three balls in box $8$, one ball in box $22$, and four balls in box $98$.