Enabling likelihood-based inference for complex and dependent data