I used to buy a raspberry syrup from the 'polska' section of the supermarket and add it to the primary making sure to adjust my DME addition for the extra sugar it added and make a raspberry stout which was pretty good. Obviously some syrups/cordials can be highly synthetic and also filled with preservatives which though unlikely, may inhibit fermentation so be sensible with ratios, keep an eye on labels etc. At a pinch I always believed I could 'fix' this by boiling or exposing to air, possibly my background with wine making sulphites.
A girlfriend once picked up a 500g bag of 'crushed malted barley' when passing a place once as a small surprise gift assuming I could find use for it in homebrew. I was exclusively brewing extract but mashed it with a small amount of oatmeal and strained it and boiled it adding it to a stout kit. Added something I guess but stout is very dominating flavour wise.
Another stout I kegged and added to the keg about 1/2lb of roasted coffee beans. This I stored up for a few months, occasionally rolling the keg for luck. Turned out very nice, a smooth addition as they went in cold. Don't know if it could be a possible contamination risk but boiling coffee obviously strips out all the harsh components compared to cold steeping it. I wouldn't grind it/use grounds. You'd get greater utilisation at the expense of having bits in your beer. Bottled some of it from the keg and the last bottle was drank about a month ago, almost 2 years later. Still ok, but pretty flat.