RC4 does not take an IV. This is relatively uncommon in stream ciphers, but it is the case in RC4.
It seems tempting to just concatenate the key with the IV, and this is the approach taken in WEP. This approach is also completely insecure, because RC4 is vulnerable to related key attacks. Combined with the fact that the RC4 keystream has significant biases even when used with a completely random key, this is usually sufficient to recover plaintext. Doing this for WEP can be done with automated tools relatively quickly even for a 104-bit key.
You should not use RC4 for any purpose these days, and definitely not with a 40-bit key. If you need a secure stream cipher with IV, I'd recommend ChaCha20 with a 256-bit key. It is both more secure and faster than RC4.
If you plan to use a random IV, then I'd recommend the XChaCha20 variant, which allows a random 192-bit nonce. The nonce for regular ChaCha20 is too short to use random nonces due to the risk of a collision, but it's fine if you are going to use a counter-based nonce approach.
If you are using this in the real world, you'll want integrity protection as well, which is usually provided by Poly1305 in conjunction with ChaCha, but you could use HMAC encrypt-then-MAC as well.