On-shell recursion relations for generic theories