Custom metadata types are the optimal way to store secret data that needs to be accessed by certain profiles and users. Access to custom metadata records can be controlled by the Salesforce sharing model. References: Salesforce Help - Custom Metadata Types Overview