In theory you can, but it obviously depends on how the cassette was manufactured. Most of the newer, wide-range cassettes use carriers that cluster the largest sprockets (e.g, 16-23t on Ultegra or 18, 21, 24, 28, 32 on XT) together, leaving only the smaller cogs loose. The reasons for this are actually quite practical, e.g., it spreads out the drive train loading across the carrier or clusters of sprockets and, in turn, the hub's cassette freehub. If you've ever seen a cassette freehub that had 9 gouges in each and every spline from a cassette that had 9 individual sprockets you'll quickly appreciate the minor inconvenience of the modern cassette designs. But I digress...
Bottom Line: Most tailoring is usually limited to those smaller cogs which isn't a bad thing... until you wear out the "custom" cassette and realize that you'll need to find other cassettes to cannibalize to replicate the franken-cob. If you have a long-cage rear derailleur you're covered for anything from a 24t to 34t... and maybe even 23t. You just need to use shorter chains on the smaller cassettes and, conversely longer chains on the taller cassettes.
Note: I have a 12x32t franken-cob and a useless Ultegra 11x23 cassette sitting around somewhere.