The phrase and all that is strictly informal, because it’s sloppy.
A person says and all that when they know that greater precision is called for but they don’t want to make the effort to find words to describe the category they’re talking about. It’s common and ordinary in everyday, informal speech.
It’s grammatically correct even without a word after that. That functions as a demonstrative pronoun, and all modifies it to mean that you’re regarding that as a whole somewhat carelessly, without regard to details and distinctions.
An informal phrase in a formal context
One reason you find and all that in books is because it occurs in dialogue. Books are normally written in formal English, but they can contain informal English in quotations. In indirect speech, appending and all that can suggest that someone is taking a sloppy, dismissive attitude toward a topic. (In informal contexts, the phrase doesn’t carry the connotation of dismissiveness nearly as often.)
Occasionally, deliberate informality in a formal context makes good rhetoric. For example, there is a textbook on vector calculus titled Div, Grad, Curl, and All That. The title, by using the phrase and all that, suggests that the book will cover the topic informally, in a tone and style that are easier to understand than the very formal approaches more commonly found in math textbooks.
The phrase and all that occasionally appears in book titles or other formal contexts to allude to a parody of English history, 1066 and All That by Sellar and Yeatman, published in 1930. Its premise is that it presents English history as you actually remember it from school. For humor, it mixes things up and reduces people and events to absurd simplicity. For example, the book incorrectly calls Alfred the Great “Alfred the Cake” because of a famous story about the real Alfred and some cakes. It rates nearly every king “a good king” or “a bad king”. The book is well-known enough that people sometimes write and all that to designate an irreverent or false history of another topic, either a deliberate one or the way people have misremembered it.
There are equivalent phrases in formal English that also avoid explicitly describing some category, leaving the reader to fill in the details: and the like, and such, and similar things. If you can replace things with a more-precise noun, that’s better in formal English. Another formal choice is et cetera, Latin for “and the rest”, usually abbreviated etc.
You could do a lot with this item, such as writing, drawing, and the like.
You can do a lot with this item, including writing, drawing, and the like.
With this item, you can do writing, drawing, and the like.
I removed your first like to avoid repeating the word.
In this particular example, it’s probably better to avoid the phrase entirely, since like, such as, and including all clearly indicate that the list is not exhaustive:
You can do a lot with this item, including writing and drawing.
That has the clarity and crispness of formal English.