How can I access generic items in a function?

It sounds like you are heading down the wrong path in your approach to writing Rules DSL code. See Design Pattern: DRY, How Not to Repeat Yourself in Rules DSL for better approaches.

In general, IMHO, the use of global lambdas is a code smell. Needing lambdas with more than 6 arguments is a code stench.

That being said, You can still access Items by name inside a lambda. So you can just use RealItemName.sendCommand(blah) and the like. But anything else will require it be passed as an argument to the lambda.