getLoopInputs with multiple flatMapValues functions