How can I create a transaction that collects inputs from many addresses and sends them to one address in bitcoind?
When you have a bitcoin balance, that balance is actually unspent outputs from transactions your addresses have already received.

So when you want to send a raw transaction, what you include in that is the transactions and unspent outputs from those transactions... these can be from any address in your wallet. 

The basic idea is;

createrawtransaction
signrawtransaction
sendrawtransaction

If you google around, you'll find plenty of examples of their use.