There is no built-in method to check OOTB Master Pages, Web Parts, Event Receivers and Page Layouts.
However, Site Columns, Field Types and Content Types are having built in function to identify whether it's OOTB or Custom.
Content Types
We can pass Content Type Id and get to know if it's OOTB or Not.
If Result = true, that means this Content Type is OOTB.
using Microsoft.SharePoint;
SPContentTypeId ctId = new SPContentTypeId(contentTypeID);
bool result = SPBuiltInContentTypeId.Contains(ctId);
Site Columns and Field Types
We can pass Site Column Id OR Field Id and get to know if it's OOTB or Not.
If Result = true, that means this Site Column Id OR Field Id is OOTB .
using Microsoft.SharePoint;
Guid guid = new Guid(customFieldID);
bool result = SPBuiltInFieldId.Contains(guid);
Web Parts
We can write our custom function, which will check if WebPart Assembly starts with Microsoft, mark that as OOTB Web Part.
Event Receivers
We can write our custom function, which will check if Event Receivers Assembly starts with Microsoft, mark that as OOTB Event Receivers.
Master Pages
We can write our custom function, which will check if Master page name belongs to any of these - "publishingmastertemplate.master","oslo.master","minimal.master",
"v4.master","seattle.master", "nightandday.master","default.master",
"app.master","mysite.master","mysite15.master","MWSDefault.master","MWSdefaultv15.master", mark that as OOTB Master Pages.
Page Layout
We can write our custom function, which will check if page layout name belongs to any of these -
, mark that as OOTB Page Layout.