I guess what I really want is a behavior architecture ... which allows me to do if, else, foreach, while, and switch statements, and which allows me to pass data between behaviors in a natural, easy way.
I notice the above desires describe almost exclusively one type of thought process: Production Rules. Production Rules represent procedural knowledge, and generally take the form of "if-then" propositions. Given a scenario, draw an appropriate response. Production rules are a variant of memorization; they involve storing information and then later retrieving that information for use when conditions are met. So if you find that your application has a lot of use for that type of thinking, then it might be appropriate to investigate advances in information storage and retrieval.
For example, let's say that our application examines an entity and activates a response based on that observation. A nieve and rather poor implementation would be a long string of If/then statements. A sleightly better version of the same thing would be a long switch statement. A much better version is an associative array, such as a dictionary or hash map which encapsulates the key->value storage and look-up association.
Note that Production Rule thinking is only one of several types of thought processes we use. There's also the "is-a" Semantic Network relationships, the "has-a" Object Frame relationships, minimally detailed Mental Models of "how" stuff works, and Memory Organization Packet lists.