What you need for pathfinding is a directed graph, in which nodes are spots on the map you can get to, and edges specify the cost of getting from each node to its neighbors.
Since your map is generated at runtime, it's only a matter of generating the graph along with it.