Transaction with multiple outputs
A transaction can have multiple inputs, so any of the scenarios you describe are possible.

Let's call David's transaction to Alice T, and its outputs T0 and T1.  Here are three ways Alice could make a transaction to achieve the desired results.


One input: T0.  Two outputs: 5 BTC to Eve, 5 BTC to Alice.  (In this case T1 remains available for Alice to spend in some future transaction.)
One input: T1.  Two outputs: 5 BTC to Eve, 15 BTC to Alice.  (T0 remains unspent.)
Two inputs: T0 and T1.  Two outputs: 5 BTC to Eve, 25 BTC to Alice.