Is there any way to draw a mesh in an editor script without using the DrawGizmo attribute?

One can access the Gizmos API in an editor script with something like the following:

[DrawGizmo(GizmoType.Selected)]
private static void DrawGizmo(ExampleMonoBehaviour myScript, GizmoType gizmoType)
{
    Gizmos.DrawMesh( ... );
}

Is there any way to do this with the Handles API, or some other way? I am hoping to be able to draw the meshes of primitive shapes that are built into the Unity editor (cube, capsule, cylinder, etc.) without using static functions that have the DrawGizmos attribute.

Depends on the context. Custom inspectors have an OnSceneGUI that you can use to draw stuff in the scene. I believe multiple methods within the Graphics class can be used to draw meshes and other things in most contexts.

Yes, this worked for me. Thank you for letting me know about this API.