Are you certain that at this point there are already at least two items in ri!upload? Personally I don't usually create a dynamic number of saves - I try to only perform a single save that updates all the data. Also I strongly distrust square brackets (because if the index doesn't exist it fails), so I usually look for an alternative that doesn't use them.
If I were doing this I would start with something like this:
saveInto: a!save(
target: ri!upload,
value: a!forEach(
items: ri!upload,
expression: a!map(
id: fv!item.id,
name: fv!item.name,
docno: index(
local!multidocuploadids,
fv!index,
null
)
)
)
)
Note: I'm not certain if the "items" parameter should be the rule input or the local variable - I can't tell without knowing more context about your interface. Also I used a map for the fields in your rule input, but if it is an explicit type you can use that instead.