One problem related to engine rattling and whining sounds has been reported for the 2012 BMW Z4. The most recently reported issues are listed below.
Noticed whining noise from engine although it drives normally. BMW dealer confirms timing chain needs replacement. My car is at 8 years, 66k miles - just over the 7/70 warranty extension for timing chain. I understand there is a class action lawsuit still pending on this known issue. It has been dealership serviced since it was purchased with full records.