'06 first engine problems

'06 325hp EFI engine with ~40 hours

2 known issues: speratic noise/knocking over 3500 rpm with engine under load.

Hopefully issue is leaning towards bad fuel. (always used mid-grade or premium in 1 case)
With transmission locked out, revving engine alone never produces noise, however accelerating over 3500rpm or constant running over 4k produces the random knocking/popping noise. Almost sounds like a back-fire even.

Other issue was discovered while investigating noise above, and that is sounds like a lifter is sticking to one of the cams as there is a metallic clicking noise relative to engine speed. Fluids have been checked regularly and proper engine break-in and 20 hour service were followed correctly. This noise may have been present before, but wasn't noticed till the ears were perked up looking for problems.

Thanks for your thoughts and advice!
Erik