Executing encrypted code? I want a code 'black box' that receives data inputs, processes those inputs, then sends out the outputs.

I want the code to be encrypted, or somehow obfuscated.

Is there any known way to do achieve this outcome?
No, assuming your code is running in an environment completely controlled by an adversary (no TPM etc.). Note that if the instructions were encrypted in some way we assume an adversary could simply intercept them after they are decrypted.

Your best shot is to obfuscate the code making it cumbersome for someone else to grasp the logic behind it. This can never give you security in a cryptographic sense.