If the Ids you plan to hard-code are about recordTypes, I would suggest to use the following (I broke it down in multiple lines because it was quite long)
From the doc
getRecordTypeInfosByDeveloperName over the
getRecordTypeInfosByName because admins are way more careful when modifying Api names than labels)
If they are just record-based be careful while "parametrazing a hard-code". That is not a best practice, you will specially suffer with sandbox refreshes, as recordIds are not always replicated (depending on the sandbox type) and also Test classes, which will force you to have "ViewAllData", which is also not recommended.
You can try to minimise the impact of the queries (if you need multiple) by using the cache, but as mentioned before, In controllers and batches is not likely that you cross that limit (worse-case scenario, pre-query them in the controller / constructor / start.
On a side-note, if they are "record-based", I would assume that you plan to have many records pointing to a small group of records (eg. having an account called "Inactive"). Be careful with that. I recommend you reading a bit about Lookup Skew