か何か after a noun means "or something": you name one thing, and something like it would do just as well, or you aren't sure it is exactly that. It goes straight after the noun.
か何か stands where the noun stood, so a particle comes after it. を is usually dropped in speech, as in the first two examples; で for a cause stays.
In an invitation, でも also makes the offer sound easy-going: こうひいコーヒーでものみません飲みませんか. か何か says outright that something else would be fine. でも only works in suggestions and wishes, so a guess about what something is takes か何か.
In casual speech か何か is often pronounced かなんか: ぺんペンかなんかあるきごう?