I'm sure there are several here who would like to help.
Could you help us help you by being a lot more specific, a lot more descriptive, on just what it is you're trying to accomplish? An example or two of the multiple input followed by an example or two of the kind of output.
In fact, it would be appropriate to give multiple examples of each, don't you agree? Maybe even a bit of the bigger picture here: what is the context in which this desired I/O exists?