Various graphical patterns (.pat files) can be typically created from both bitmap and vector sources (from example bmp via bmp to pat conversion)and later applied to a new graphics file to fill out some elements with such a pattern. Generally speaking, many graphics programs can create their own pattern through a dedicated function, typically found as some kind of pattern library.
Open BMP file Open PAT file