Conventional mazes can be created by generating a spanning tree of a rectangular grid of nodes. Check out this great presentation by Jamis Buck to learn about conventional maze generators.
We can translate such spanning trees to be used in a Pac-Man tilemap by placing each node in the center of a 3x3 tile cell: